返回列表 发帖

Found a swap file by the name "/etc/sysconfig/network-scri..."的解决

现象:vi /etc/sysconfig/network-scripts/ifcfg-eth0命令修改网卡信息时,出现如下提示:
E325: ATTENTION
Found a swap file by the name "/etc/sysconfig/network-scripts/.ifcfg-eth0.swp"
          owned by: root   dated: Wed May  4 02:30:35 2016
         file name: /etc/sysconfig/network-scripts/ifcfg-eth0
          modified: YES
         user name: root   host name: SHILLAN-CentOS67X64
        process ID: 22185
While opening file "/etc/sysconfig/network-scripts/ifcfg-eth0"
             dated: Wed May  4 02:56:40 2016
      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/network-scripts/ifcfg-eth0"
    to recover the changes (see ":help recovery").
    If you did this already, delete the swap file "/etc/sysconfig/network-scripts/.ifcfg-eth0.swp"
    to avoid this message.
"/etc/sysconfig/network-scripts/ifcfg-eth0" 16L, 291C
Press ENTER or type command to continue

原因:在此次vi或vim操作前有过一次使用vi或vim 操作/etc/sysconfig/network-scripts/ifcfg-eth0文件时出现了异常中断,所以在当前目录下产生了一个/etc/sysconfig/network-scripts/ifcfg-eth0.swp文件,这个文件使用ls命令查看不能发现,使用ls -a命令查看可以知道/etc/sysconfig/network-scripts/ifcfg-eth0.swp是一个隐藏文件。
解决:把该文件删除即可:
[root@localhost tmp]# rm /etc/sysconfig/network-scripts/.ifcfg-eth0.swp
欢迎光临:逐梦论坛

返回列表

Powered by Discuz! 7.2   论坛QQ群:逐梦论坛群

© 2001-2021 Comsenz Inc. 鲁公网安备 37120302000001号