赞
踩
执行vim /etc/hosts文件 命令报错
Found a swap file by the name "/etc/.hosts.swp"
owned by: root dated: Wed Mar 31 14:08:08 2021
file name: /etc/hosts
modified: YES
user name: root host name: VM-0-13-centos
process ID: 13607
While opening file "/etc/hosts"
dated: Wed Oct 21 09:11:17 2020
(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/hosts"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file "/etc/.hosts.swp"
to avoid this message.
Swap file "/etc/.hosts.swp" already exists!
[O]pen Read-Only, (E)dit anyway, (R)ecover, (D)elete it, (Q)uit, (A)bort:
直接执行此命令
sudo rm -f /etc/.hosts.swp 即可
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。