How to solve the E325: ATTENTION error when editing files with Vim

Source: Internet
Author: User

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:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.