Swap file

Carl Reynolds redhat-install-list at hyperbole-software.com
Thu Dec 22 22:36:17 UTC 2005


Bret Stern wrote:

>How/where do I remove a swap file?
>
>A network error occurred during a remote login
>while vi (editing) a perl script.
>
>  
>
I assume you mean a .*.swp file as created by vi.

The first thing to do is to edit the original file with the -r option
   vi -r file

This will construct a new file with any changes you may have lost in the
crash.
Save this as file.save and leave vi.

Now run
   diff file file.save

to make sure the new file hasn't lost anything information or been
corrupted in some way.

Either remove the new file
      or remove the old file and rename the new file.

Now you can type
   rm .file.swp

to remove the recovery file that vi created.



Carl.







More information about the Redhat-install-list mailing list