C4f1151075b447779af31e99d6cf70e2c6eb47ac
By:
newbie

how can i delete memcached swap file on centos? i made a mistake and now sucked :(

November 4, 2014 1.6k views

Hello,
how can i delete memcached swap file? i made a mistake when i entered to VI to change configuration now i cant edit configuration file to change 'OPTIONS=' section:

now always when i try to enter vi /etc/sysconfig/memcached getting this error. tried recover, tried delete not work

login as: root
root@128.199.129.23's password:
Last login: Tue Nov 4 05:10:30 2014 from 103.19.253.50
[root@mrcmanager ~]# vi /etc/sysconfig/memcached
[root@mrcmanager ~]# vi /etc/sysconfig/memcached
E325: ATTENTION
Found a swap file by the name "/etc/sysconfig/.memcached.swp"
owned by: root dated: Tue Nov 4 04:41:04 2014
file name: /etc/sysconfig/memcached
modified: YES
user name: root host name: mrcmanager
process ID: 20394
While opening file "/etc/sysconfig/memcached"
dated: Tue Nov 4 05:12:41 2014
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 /etc/sysconfig/memcached"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file "/etc/sysconfig/.memcached.swp
"
to avoid this message.

-- More --

2 comments
  • swap files found

    Swap files found:
    Using specified name:

    1. .memcached.swl owned by: root dated: Tue Nov 4 05:13:47 2014 file name: /etc/sysconfig/memcached modified: YES user name: root host name: mrcmanager process ID: 20815
    2. .memcached.swm owned by: root dated: Tue Nov 4 04:50:03 2014 file name: /etc/sysconfig/memcached modified: YES user name: root host name: mrcmanager process ID: 20494
    3. .memcached.swn owned by: root dated: Tue Nov 4 04:44:52 2014 file name: /etc/sysconfig/memcached modified: YES user name: root host name: mrcmanager process ID: 20441
    4. .memcached.swo owned by: root dated: Tue Nov 4 04:43:09 2014 file name: /etc/sysconfig/memcached

    i think i have to delete them. how can i delete them all??

  • Can you post the contents of /etc/sysconfig/memcached?

    sudo cat /etc/sysconfig/memcached
    
1 Answer
Have another answer? Share your knowledge.