其他分享
首页 > 其他分享> > vi编辑状态被挂起怎么办?

vi编辑状态被挂起怎么办?

作者:互联网

vi编辑状态,按下ctrl+z键后,被挂起。显示:

[2]+  Stopped                 vi verify2.sage

此时,再vi该文件,则出现错误提示:

E325: ATTENTION
Found a swap file by the name ".verify2.sage.swp"
          owned by: root   dated: Thu Sep  1 06:48:57 2022
         file name: ~root/breaking-abc/breaking-abc-master/verify2.sage
          modified: no
         user name: root   host name: VM-48-31-ubuntu
        process ID: 7100 (still running)
While opening file "verify2.sage"
             dated: Thu Sep  1 06:42:47 2022

(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 verify2.sage"
    to recover the changes (see ":help recovery").
    If you did this already, delete the swap file ".verify2.sage.swp"
    to avoid this message.

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

怎么办呢?

这是程序在后台运行,在当前目录下会生成一个.swp文件。

假设你正在编辑的文件名是abc.txt,则会自动生成一个.abc.txt.swp

这是一个隐藏文件,用ls -a可以看到。直接删除这个文件就可以了。

标签:name,vi,sage,编辑,file,verify2,swp,怎么办
来源: https://www.cnblogs.com/RicL/p/16645156.html