Linux Vi E325 Found A Swap File by The Name

Phenomenon description:

The VI editor that entered the file was an abnormality, and the cursor could not operate. This error occurs when you disconnect the xShell connection, redirect, and then edit the file again. The file name that is “.” Is hidden file. The SWAP file is a swap file.

2. Translate

(1) Another program may also edit the same file.

If this is this, please pay attention to avoiding two different versions of the same file (instance).

(Solution 🙂 Exit, or continue to carefully.

(2) Crash crash when editing this file last time.

If this is this, please use “: recover” or “vim -r exportcert.cpp”

Restore the modified content (see “Help Recovery”).

If you have already recovered, please delete the exchange file “.exportcert.cpp.swp”

To avoid this message again.

3. Cause:

This is because, when you open a file with Vi / Vim, a filename.swap file is generated for saving data. This file can be recovered when the file is absent normally. When it is closed, this file will be automatically deleted automatically; when it is not properly closed, it will not be deleted. So prompt to exist .swap file, you can recover files at this time:

Vim -r filename.c (if VI uses VI) Recovery, delete the .swap file

4. Solution:

Go to the / root directory (the directory where this file is located) is executed:

1) LS -A: Display all files (including hidden files);

2) RM FileName: Delete this hidden SWAP file (intermediate file, Tab automatically complement). —> Enter Y according to the prompt

3) VI filename: Enter the VI of the file again. success. —> i —> Insert content —> ESC —>: WQ Save and exit.

4) Verification: Cat FileName. View the content in the file.

(CAT imagines “cat eyes” on the door — View, actually concatenate abbreviation, but not good memory, so abandonment. Change to Lenovo memory)

Size: 59.8 KB View Image Accessories

Related Posts