Linux editing file prompts SWP file already exists __linux

Source: Internet
Author: User

When you edit a file in a Linux server, and for some reason the exception exits, enter the editor again to prompt:

Swap file ". Http_code.sh.swp" already exists!
[O]pen read-only, (E) dit anyway, (R) Ecover, (Q) uit, (A) Bort:

If this is the case, whichever option you choose, the next entry will still appear such a hint, the reason for this problem is that after the exception exit, Linux will generate a SWP file for this file, the next time the editor will judge if there is this file will still be prompted if you do not want to restore the contents of the old file , the file will be deleted directly, the hint will not appear again.

Executing the LL command under the current directory is invisible to the file and can be executed directly:

[Root@vm_170_163_centos sh]# rm-rf. http_code.sh.swp
Then the http_code.sh is edited, and no longer appears.


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.