> >saved for recovery. You can recover most, if not all, of the > >changes to this file using the -r option to vi: > > > > vi -r /tmp/vi.7faEP4
Richard Otte <[EMAIL PROTECTED]> [2002-09-11 21:23:12 -0700]: > For almost a year a person with an account on my machine has been > getting email from root about recovering a file that was being > edited. I do not know how to stop the user from getting these > messages. There is no file (/tmp/vi.7faEP4) that the message refers > to, and so the user cannot recover it using vi. If anybody has any > suggestions about how to stop this, I'd appreciate it. Thanks, The file /tmp/vi.7faEP4 does not exist. It is telling you that you will be able to recover that file. After recovery the file will exist. Not before. You can list files that are available for recover with 'vi -r'. At boot time or perhaps by cron this is being mailed to users. Even if you don't want to recover the file to end the message you should do so. You can delete the file after you have vi running on the recovered file. But that will move it out of the preserve area and back into user space where you own the file again. The vi program keeps spill files in /tmp. When the system crashes it and recovers it will save those files to /var/preserve or /var/spool/preserve or /var/tmp/vi.recover or some such location. You have that and if you look you will find a file there. Most systems will put a tmp cleaner on that directory and will delete files which are older than a week or so. If the user has not recovered the file in a week after a system crash then they don't care and you should clean up the crash file. Some vi programs keep them in /var/tmp/vi.recover so that they are naturally cleaned by the system tmp cleaners. You are running one of those, aren't you? Let me be critical. But this is meant to be constructive. This is clearly a case where RTFM would solved your problem. Let's look at 'man vi' -r Recover the specified files, or, if no files are specified, list the files that could be recovered. If no recoverable files by the specified name exist, the file is edited as if the -r option had not been specified. Just do the command it is suggested. It looks from your mail that you never tried that. You are root on the machine so you can become them if you want to try this yourself instead of waiting for them to do it. su root # become root su - user # become the user vi -r /tmp/vi.7faEP4 # run the command as the user If after running that command as that user if it fails to recover the file then you certainly have probably found a problem. But I bet it works. Bob
msg01997/pgp00000.pgp
Description: PGP signature