Saturday, January 20, 2018

Fix "Found a swap file by the name"

1. If you get the following:

E325: ATTENTION
Found a swap file by the name ".file.conf.swp"
          owned by: root   dated: Wed Jan  3 11:43:03 2018
         file name: /etc/httpd/conf.d/file.conf
          modified: YES
         user name: root   host name: system-rh
        process ID: 19891
While opening file "file.conf"
             dated: Tue Jan 16 15:51:50 2018
      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 file.conf"
    to recover the changes (see ":help recovery").
    If you did this already, delete the swap file ".file.conf.swp"
    to avoid this message.


2. List all hidden files

ls -al

3. Remove troubled swap file:
rm -rf .file.conf.swp

No comments:

Post a Comment