[Previous] [Contents] [Next]

elvrec

Recover elvis documents after a crash (UNIX)

Syntax:

elvrec [preservedfile [newfile]]

Options:

preservedfile
The name of the file you had been editing with elvis that is to be recovered.
newfile
The name of the file you want the recovered text written to, instead of the original name of the preserved file.

Description:

If you're editing a file when elvis dies, the system crashes, or power fails, the most recent version of your text will be preserved. The preserved text is stored in a special directory; it does not overwrite your text file automatically.

The elvrec program locates the preserved version of a given file, and writes it over the top of your text file -- or to a new file, if you prefer. The recovered file will have nearly all of your changes.

To see a list of all recoverable files, run elvrec with no arguments.

Examples:

Write a list of all recoverable files to the standard output:

    elvrec

Recover the file myfile.c which you had been editing when the power failed:

    elvrec myfile.c

Recover the file stuff and place the recovered text in the file newstuff:

    elvrec stuff newstuff

Files:

/usr/preserve/p*
The text that was preserved when elvis died.
/usr/preserve/Index
A text file which lists the names of all preserved files, and the names of the /usr/preserve/p* files which contain their preserved text.

Contributing author:

Steve Kirkendall

Caveats:

The elvrec utility is very picky about filenames. You must tell it to recover the file using exactly the same pathname as when you were editing it. The simplest way to do this is to go into the same directory that you were editing, and invoke elvrec with the same filename as elvis. If that doesn't work, then try running elvrec with no arguments, to see exactly which pathname it is using for the desired file.

Due to the permissions on the /usr/preserve directory, on UNIX systems elvrec must be run as root. This is accomplished by making the elvrec executable be owned by root and setting its "set userid" bit (chmod u+s).

If you're editing a nameless buffer when elvis dies, then elvrec will pretend that the file was named foo.

See also:

elvis


[Previous] [Contents] [Next]