在终端中获取不适当的输出

在终端中获取不适当的输出

我已经在 Vim 中编写了一个 C 程序,并尝试通过命令 vim filename.c 打开文件,我得到了这个输出。

E325: ATTENTION
Found a swap file by the name ".linklist.c.swp"
          owned by: atharva   dated: Wed Jul 17 22:29:18 2019
         file name: ~atharva/linklist.c
          modified: YES
         user name: atharva   host name: atharva-HP-Notebook
        process ID: 8235
While opening file "linklist.c"
             dated: Wed Jul 17 22:56:38 2019
      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 linklist.c"
    to recover the changes (see ":help recovery").
    If you did this already, delete the swap file ".linklist.c.swp"
    to avoid this message.

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

答案1

计算机要求您通过按下适合您要执行的操作的键来选择要执行的操作,O,E,R,D,Q,A以便做出适合您情况的相应选择。

这里的问题是,当您使用两个不同的程序打开文件时,计算机实际上会在(交换文件)中创建该文件的两个单独的工作副本 - 并且它需要知道如何处理这些副本,以及在您完成后将哪一个副本存储为硬盘上的永久副本。

*.swap 文件是文件所在的临时副本。您需要根据自己的情况选择要执行的操作。

相关内容