16.12.2012 Views

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Usage notes<br />

/etc/recover/$LOGNAME/VIt*<br />

Contains the recovered text of the file that corresponds to the VIn* file<br />

Rule: Using a TFS for vi temporary files will make it impossible to recover vi files<br />

after a system crash. vi writes temporary files to TMP_VI or TMPDIR (or /tmp by<br />

default), and if the system crashes, those files can be recovered by the exrecover<br />

command, which automatically runs from /etc/rc. If the files are written to a TFS,<br />

then they will be wiped out when the system is IPLed. See TMP_VI description<br />

under Environment Variables section of this command.<br />

1. To recover all the files in the temporary directory, this command must be run<br />

with appropriate permissions (for example, superuser privileges) so the<br />

recovered files can be stored in the /etc/recover directory with the appropriate<br />

ownerships and permissions.<br />

For example, the following is a shell script to recover the files from TMPDIR,<br />

where TMPDIR is the default directory:<br />

export TMPDIR=/tmp<br />

exrecover<br />

2. If it is invoked by a nonprivileged user (for example, a user who is not a root<br />

user), then only those files owned by that user are recovered. Because vi and<br />

ex create their working files in directories specified by the TMPDIR or TMP<br />

environment variables, one of these environment variables must be set before<br />

exrecover can be issued.<br />

For example, the following is a shell script that recovers files from $HOME/tmp:<br />

export TMPDIR=$HOME/tmp<br />

exrecover<br />

3. exrecover is also invoked by vi or ex when you issue the ex preserve<br />

command or when exrecover receives a SIGHUP signal. The working files<br />

created by vi and ex are found in a default temporary directory (such as /tmp)<br />

or in the directory specified by the TMPDIR or in the directory specified by the<br />

TMP_VI, TMPDIR, or TMP environment variable. Three working files are<br />

created:<br />

name_file<br />

Contains the actual name of the vi file. The names of all name_files<br />

begin with VIn.<br />

line_table_file<br />

Contains a dummy page followed by data that gives, in line number<br />

order, the offset for each line of text in the corresponding<br />

paged_text_file. The page size is typically 1K, but may vary on some<br />

systems. The names of all line table files begin with VIl.<br />

paged_text_file<br />

Contains lines of text that are at most LINE_MAX bytes in length. Lines<br />

shorter than LINE_MAX byte are ended by a newline. The names of all<br />

paged text files begin with VIt.<br />

4. You can also run the program by specifying name_file on the command line. For<br />

example:<br />

exrecover /tmp/VInaaaa.111 /tmp/VInbbbb.222 ...<br />

exrecover daemon<br />

exrecover searches for a name_file and tries to open the associated line table<br />

and paged text files. If all these files are found, exrecover builds, from the line<br />

table and paged text files, a text file and stores it in the directory<br />

/etc/recover/$LOGNAME.<br />

Chapter 2. Shell command descriptions 269

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!