linux vi打开文件出现的信息是什么意思?要怎么操作
Whileopeningfile"test.txt"dated:SunApr1320:13:402014NEWERthanswapfile!(1)Anotherprogr...
While opening file "test.txt"
dated: Sun Apr 13 20:13:40 2014
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.txt"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file ".test.txt.swp"
to avoid this message.
Swap file ".test.txt.swp" already exists!
[O]pen Read-Only, (E)dit anyway, (R)ecover, (D)elete it, (Q)uit, (A)bort:
-- More -- 展开
dated: Sun Apr 13 20:13:40 2014
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.txt"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file ".test.txt.swp"
to avoid this message.
Swap file ".test.txt.swp" already exists!
[O]pen Read-Only, (E)dit anyway, (R)ecover, (D)elete it, (Q)uit, (A)bort:
-- More -- 展开
3个回答
推荐于2017-11-26
展开全部
用vi编辑文件(如这里的test.txt)时, 系统会自动产生一个文件叫.test.txt.swp。如果正常退出,此文件会被自动删去。如果上次非正常退出,则不会。如果再编辑它,系统会首先查.test.txt.swp
是否存在,如果存在,就会问你如何处理。 选择在结尾:
O: read-only, 只读,不能改
E: 可以改,从前的修改都丢失
R: 恢复(从前的修改)
D: 删去(我没用过,估计是删去.test.txt.swp)
Q: 退出(什么也不做)
A: 半途放弃(没用过)
最重要的问题是:是否有另外的应用在使用此文件?如果是,最好先找出(用fuser命令),再决定如何处理。
是否存在,如果存在,就会问你如何处理。 选择在结尾:
O: read-only, 只读,不能改
E: 可以改,从前的修改都丢失
R: 恢复(从前的修改)
D: 删去(我没用过,估计是删去.test.txt.swp)
Q: 退出(什么也不做)
A: 半途放弃(没用过)
最重要的问题是:是否有另外的应用在使用此文件?如果是,最好先找出(用fuser命令),再决定如何处理。
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
不知道这个错误是怎么样产生的, 不过可以帮助排查一下啊!
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询