E325: 注意 找到名为“.write.c.swp”的交换文件 [已关闭]

E325: ATTENTION Found a swap file by the name ".write.c.swp" [closed]

提问人:Abhishek Singh 提问时间:11/15/2023 更新时间:11/15/2023 访问量:23

问:


这个问题似乎与特定的编程问题、软件算法或程序员主要使用的软件工具无关。如果您认为该问题在另一个 Stack Exchange 站点上是主题,您可以发表评论以解释在哪里可以回答该问题。

7天前关闭。

描述

我在使用 vi 编辑器时遇到了一个问题。我正在编辑一个文件,不小心按下了它,它退出了文件,当我重新打开它时,我收到了以下错误:Ctrl + Z

E325: ATTENTION
Found a swap file by the name ".write.c.swp"
          owned by: abhishek-singh   dated: Wed Nov 15 12:52:18 2023
         file name: ~abhishek-singh/sysCalls/write.c
          modified: no
         user name: abhishek-singh   host name: BEAST
        process ID: 646 (STILL RUNNING)
While opening file "write.c"
             dated: Wed Nov 15 12:57:08 2023
      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 write.c"
    to recover the changes (see ":help recovery").
    If you did this already, delete the swap file ".write.c.swp"
    to avoid this message.

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

重现步骤

  • 在 vi 中打开文件vi filename.txt
  • 开始编辑。
  • 按下可暂停该过程。Ctrl+Z
  • 重新打开文件。

我试过什么

我尝试了该命令,但导致以下错误::recover

Using swap file ".write.c.swp"
Original file "~/sysCalls/write.c"
E308: Warning: Original file may have been changed
E309: Unable to read block 1 from .write.c.swp

那么有人可以向我解释下一步该怎么做以及这条消息的真正含义吗?

Linux Ubuntu Windows-subsystem-for-linux vi

评论

1赞 Ulrich Eckhardt 11/15/2023
这不是一个编程问题,而是关于现有软件的使用,所以最好在 superuser.com。不过,请务必先阅读那里的网站指南!无论如何:duckduckgo.com/......
0赞 choroba 11/15/2023
Ctrl+Z停止作业。不要再次打开文件,而是通过运行 将作业放回前台。vimfg

答: 暂无答案