1830756 Members
2716 Online
110015 Solutions
New Discussion

recovery area used by vi

 
SOLVED
Go to solution
Marc Ahrendt
Super Advisor

recovery area used by vi

i lost my login session while using "vi" and got an email from the system saying that a "copy of an editor buffer" related to the file i was editing using "vi" is available to recover by typing "vi -r "

my question is where is this recovery area on the system? ..."man vi" gives no clues

i do not think its /var/preserve, /var/tmp, or /var/adm/tmp

basically i lost my vi session before being able to save recent changes, and i am just curious where this temporary location is more than i am interested in recovering my lost edits (i am starting to think like a nerd)
hola
3 REPLIES 3
Sundar_7
Honored Contributor
Solution

Re: recovery area used by vi

Infact you got it right. vi/ex saves those files for recovery in /var/preserve directory in a format that only vi/ex understands. filenames start with ExXXXYYYYY

# cd /var/preserve
# strings Ex*


Learn What to do ,How to do and more importantly When to do ?
Hein van den Heuvel
Honored Contributor

Re: recovery area used by vi

Hmm,

Indeed not too much doc on this directory.
The various VI web sites mention it of course. For example.

http://www.galactic-guide.com/articles/2R170.html
http://www.kostis.net/hints/vi-editor.htm

btw... those reminded me nicely about the :pre command and the ex init files.

Looking back in the forum I found a refernce to : /usr/share/doc/file_sys.txt
But that file is now replaced by an online document according to: /usr/share/doc/README

http://docs.hp.com
search: file_sys.txt
---> http://docs.hp.com/hpux/onlinedocs/5963-8942/00/00/1-con.html
search: preserve

Cheers,
Hein.
Marc Ahrendt
Super Advisor

Re: recovery area used by vi

thx guys ...yes, the location is /var/preserve

my problem was that nothing was inside this directory yet i got an email from vi about using "ex -r" etc...

must have been a strange circumstance where my vi session got killed and i got the recover email but there actually was no buffer file to recover ...from the documentation this recovery buffer is not always going to get the most recent unsaved edits before a aborted vi session
hola