1833352 Members
2481 Online
110051 Solutions
New Discussion

Re: VI editor problem

 
SOLVED
Go to solution
Jose A. Lara
Occasional Contributor

VI editor problem

hi there!

When I try to open a file with VI, does not open the file and send this message:

*A copy of an editor buffer of your file "./pant.xxx"
was saved when the editor was killed.
This buffer can be retrieved using the "recover" command of the editor.
An easy way to do this is to give the command "ex -r ./pant.xxx".
This works for "edit" and "vi" also.*

Any clarification would be nice.
Thank you in advance.

Alara
10 REPLIES 10
Rodney Hills
Honored Contributor

Re: VI editor problem

vi keeps recovery information. Back in the days of modem dialups, it was not uncommon for a user to just be disconnected.

This recovery helps protect a user from loss of changes.

HTH

-- Rod Hills
There be dragons...
Steven E. Protter
Exalted Contributor

Re: VI editor problem

When you edit a file a backup copy is made. If the session is terminated abnormally, you get a chance to recovery the file you were weorking on.

A temporary filelocation should be indicated so you can grab it. You may be prompted if you wish to recover the file.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Jose A. Lara
Occasional Contributor

Re: VI editor problem

Thanks a lot for your answer

But I have this problem when I edit any file, I have to retry 1 to 3 times and then the file open.

Any suggestions on making this work?

Regards

AL
Steven E. Protter
Exalted Contributor
Solution

Re: VI editor problem

Suggestion:

erase the file its asking you to recover.

rm

Then it should stop happening.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Steve Post
Trusted Contributor

Re: VI editor problem

Now I'm not trying to be insulting here. I'm sure you don't do this.

This is the scenario I know. A user edits a file using vi. They make changes to it. Then they never save the changes or log off or anything. They just drive home for the day.

A batch (cron) process comes along and kills any user logins that are idle for over 4 hours. Or a network process times out the session, effectively killing it. Somehow the vi session is killed. The usual reason is the person was idle for hours.

The user comes back into work the next day, and gets "*A copy of an editor buffer of your file "./pant.xxx"
was saved when the editor was killed.
This buffer can be retrieved ...."

So the moral is:
When you edit a file, and make changes, save the changes.
When you are done working, log off.

steve
Steve Post
Trusted Contributor

Re: VI editor problem

I reread your problem. You're obviously NOT idle for hours on end.
But there is something that seems strange to me....

"You try to get into the file a few times, before it lets you in."

That means you are actively trying to modify the file. Yet you are not able to get in.
Is this file being edited by someone else?
Is this file being deleted every 2 seconds?
Is the directory the file is in being moved?
Is this file a database file being accessed by large numbers of people?

How big is the file? If it is small enough, copy it to your home directory. Use view instead of vi.

Ah one more question. When you are in the file, editing it, can you exit successfully?

Oh one more.....When vi runs, a copy of the file in question goes somewhere under the tmp directory. Is /tmp full? Do you have permission to use the /tmp directory?

Yes. even another question for you....Are you editing a FILE? Perhaps it's a pipe, or device, or something that's NOT editable.

steve
Steve Steel
Honored Contributor

Re: VI editor problem

Hi


Try the rm and if there are any permission problems you will know.

Make sure vi is ok

ll -d /usr/bin/vi
-r-xr-xr-t 6 bin bin 233472 Oct 27 1997 /usr/bin/vi

If the t is missing can give odd things

see man chmod


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Jose A. Lara
Occasional Contributor

Re: VI editor problem

thanks a lot to all for your help.

I just delete the temporary file ./pant.xxx
Marc Ahrendt
Super Advisor

Re: VI editor problem

jose, i had a similar issue ...what may be of interest to you is where the temporary file vi makes is located

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=732974
hola
Jose A. Lara
Occasional Contributor

Re: VI editor problem

thanks for your help