centos系統(tǒng)使用VI訪問文件時(shí)候出現(xiàn)E325: ATTENTION類的錯(cuò)誤提示處理方法
2017-03-12 17:18:37
13657
錯(cuò)誤出現(xiàn)情況的是,在我們用VI編輯文件時(shí)候在文件加載時(shí)候出現(xiàn)錯(cuò)誤提示,需要在安任意鍵后才能正常編輯.
錯(cuò)誤提示類似如下:
E325: ATTENTION
Found a swap file by the name "/etc/sysconfig/.iptables.swp"
owned by: root dated: Sun Mar 12 09:53:43 2017
file name: /etc/sysconfig/iptables
modified: YES
user name: root host name: 64.242.55.116.broad.km.yn.dynamic.163da
process ID: 3443
While opening file "/etc/sysconfig/iptables"
dated: Sun Mar 12 09:55:13 2017
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 /etc/sysconfig/iptables"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file "/etc/sysconfig/.iptables.swp"
to avoid this message.
"/etc/sysconfig/iptables" 22L, 879C
這種情況一般是由于在用vi編輯時(shí)候突然出現(xiàn)異常導(dǎo)致vi編輯終止導(dǎo)致的。例如 用SSL連接編輯時(shí),斷開。
處理方法:
通常出現(xiàn)這樣的情況是因?yàn)橹安僮髦幸馔庵袛嗪笙到y(tǒng)在同級目錄下生成了一個(gè).開頭的同名文件。
如上報(bào)錯(cuò)是在編輯防火墻配置文件時(shí)候出現(xiàn)的,在同級目錄下生成了.iptables.swp的文件。只需要上了就額可以正常了。
刪除命令:
rm –f .iptables.swp
紅色是生成的文件名字