Linux under VI or VIM operation found a swap file by the name causes and solutions

Source: Internet
Author: User

When opening a Test.java file with VI or VIM under Linux

[Email protected] tmp]# VI Test.java

The following information appears:

e325: attention    found a swap file by the name  " . TEST.JAVA.SWP "             owned by:  root   dated: Wed Dec  7 13:52:56 2011          file name: /var/tmp/Test.java          modified: yes         user name : root   host name: localhost          process ID: 26153  (still running)     While opening  file  "Test.java"            dated: Wed  dec  7 14:00:46 2011        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  test.java "      to recover the changes  (see "): Help recovery ") .      if you did this already,  delete the swap file  ". TEST.JAVA.SWP "      to avoid this message.      "Test.java"  11l, 237c    press enter or type command  to continue

The reason is that the VI or vim before the operation of the use of VI or VIM operation Test.java file when an abnormal interruption, so in the current directory produced a. Test.java.swp file, this file using the LS command to view can not be found, using LS- A command view can know that TEST.JAVA.SWP is a hidden file.

Note: Files that begin with. are hidden files

To remove the above warning prompt, delete the file:

[[Email protected] tmp]# RM. Test.java.swprm:remove regular file '. Test.java.swp '? Y[[email protected] tmp]#

You can use VI or vim to edit other files in a similar manner as possible.


This article is from "I will be a Linux Expert" blog, please make sure to keep this source http://jimmyrobert.blog.51cto.com/11214519/1744646

Linux under VI or VIM operation found a swap file by the name causes and solutions

Related Article

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.