linux下编辑文件异常退出

在linux下编辑一个文件,异常退出后,如果下次再编辑文件就会产生如下报错

E325: ATTENTION
Found a swap file by the name ".login.swp"
owned by: root dated: Thu Mar 19 13:53:49 2015
file name: /etc/pam.d/login
modified: no
user name: root host name: oracle-test
process ID: 14815
While opening file "login"
dated: Thu Mar 19 15:55:35 2015
NEWER than swap file!

(1) Another program may be editing the same file.
If this is the case, be careful not to end up with two
different instances of the same file when making changes.
Quit, or continue with caution.

(2) An edit session for this file crashed.
If this is the case, use ":recover" or "vim -r login"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file ".login.swp"
to avoid this message.
"login" 18L, 805C
Press ENTER or type command to continue

只需清楚这个swap文件就行

rm -r .login.swp

posted @ 2015-05-04 13:26  壮哉  阅读(1754)  评论(0编辑  收藏  举报