The following error occurs when you use Vim to edit a file:
[Root @ zabbix ~] # Vim/usr/local/msmtp/etc/msmtprc
E325: ATTENTION
Found a swap file by the name "/usr/local/msmtp/etc/. msmtprc. swp"
Owned by: root dated: Thu May 22 15:47:09 2014
File name:/usr/local/msmtp/etc/msmtprc
Modified: YES
User name: root host name: zabbix.clvn.com.cn
Process ID: 3122
While opening file "/usr/local/msmtp/etc/msmtprc"
Dated: Thu May 22 15:44:52 2014
(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/usr/local/msmtp/etc/msmtprc"
To recover the changes (see ": help recovery ").
If you did this already, delete the swap file "/usr/local/msmtp/etc/. msmtprc. swp"
To avoid this message.
Swap file "/usr/local/msmtp/etc/. msmtprc. swp" already exists!
[O] pen Read-Only, (E) dit anyway, (R) ecover, (D) elete it, (Q) uit, (A) bort:
Solution:
Method 1: press D in the prompt above to delete the temporary file.
Method 2,
[Root @ bjsd-zabbix-x86v-app01 ~] # Cd/usr/local/msmtp/etc
[Root @ bjsd-zabbix-x86v-app01 etc] # ls-
... Msmtprc. msmtprc. swp
[Root @ bjsd-zabbix-x86v-app01 etc] # rm-rf. msmtprc. swp
Vim Learning Guide
Quick learn Vi Editor
Powerful Vim Editor
Build a Vim Development Environment on CentOS 6.2
Vim 7.4a released, a new and faster Regular Expression Engine
Install the highlighted Vim editing tool in CentOS 5.4
Vim tips: C language settings
Set the Vim row number in Ubuntu
Vim editor basic tutorial
This article permanently updates the link address: