Linux下Vim编辑文件时出现Found a swap file by the name ".test.c.swp"

我在Linux系统下使用Vim编写test.c文件时出现了以下问题信息:

E325: ATTENTION
Found a swap file by the name ".test.c.swp"
          owned by: eHunter   dated: Mon Mar 23 18:07:33 2020
         file name: ~eHunter/project/test.c
          modified: YES
         user name: eHunter   host name: eHunter-VirtualBox
        process ID: 3315
While opening file "test.c"
             dated: Tue Mar 24 09:06:23 2020
      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 test.c"
    to recover the changes (see ":help recovery").
    If you did this already, delete the swap file ".test.c.swp"
    to avoid this message.

Swap file ".test.c.swp" already exists!
[O]pen Read-Only, (E)dit anyway, (R)ecover, (D)elete it, (Q)uit, (A)bort:

原因是我在用vim编写test.c文件的代码时,由于电脑死机而重启之后再进去继续用vim编写test.c时出现了这些信息,因为电脑死机直接断开了电源而导致文件出现了异常中断错误,所以产生了一个.test.c.swp隐藏文件,把该文件删除就可以了。

注:使用ls命令是查看不到该隐藏文件的,用ll命令就可以看到。

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值