在 CentOS 系统中遇到:E325: ATTENTION Found a swap file by the name 的问题的解决办法

学习笔记 马富天 2017-11-22 10:11:05 397 0

【摘要】很多时候我们在 linux 系统中当我们使用 vi 或 vim 进行编辑文档的时候,突然发生意外中断了,导致文档没有保存即退出,而当我们再次打开该文件的时候,往往会提示这样的错误:E325: ATTENTION Found a swap file by the name "",本文记录一下解决办法。

给出完整的错误提示:

E325: ATTENTION

Found a swap file by the name ".worker.php.swp"

owned by: root dated: Tue Nov 21 15:56:05 2017

file name: /var/www/html/worker.php

modified: YES

user name: root host name: localhost.localdomain

process ID: 31940

While opening file "worker.php"

dated: Wed Nov 22 03:56:57 2017

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 worker.php"

to recover the changes (see ":help recovery").

If you did this already, delete the swap file ".worker.php.swp"

to avoid this message.

这应该是比较常见的问题,在刚刚学习 linux 的时候,遇到这样的问题,往往是没有去思考,就一概而过,而具体的解决办法就是:当我们在 vi 编辑文档过程中,若出现意外中断,则会在当前目录下产生一个 .*.swp 文件,这个文件是一个隐藏文件,使用 ls 是不能够查看到的,要使用 ls -a 或者 ll -a 命令可以查看到,只要我们将这个文件删除,当我们再次 vi 打开该文档的时候就不会再出现以上的报错。

请输入图片名称请输入图片名称请输入图片名称

版权归 马富天个人博客 所有

本文标题:《在 CentOS 系统中遇到:E325: ATTENTION Found a swap file by the name 的问题的解决办法》

本文链接地址:http://www.mafutian.com/350.html

转载请务必注明出处,小生将不胜感激,谢谢! 喜欢本文或觉得本文对您有帮助,请分享给您的朋友 ^_^

1

1

上一篇《 给出一个 Gearman 的 PHP 编程实例 》 下一篇《 在 CentOS 6.3 下安装 PhantomJS 》

暂无评论

评论审核未开启
表情 表情 表情 表情 表情 表情 表情 表情 表情 表情 表情 表情 表情 表情 表情 表情 表情 表情 表情 表情 表情 表情 表情 表情
验证码

TOP10

  • 浏览最多
  • 评论最多