gpt4 book ai didi

unix - 什么是交换文件?

转载 作者:行者123 更新时间:2023-12-01 11:51:13 25 4
gpt4 key购买 nike

使用 vi 我开始编辑一个 html 文件,但我不小心退出了 session ,现在当我再次尝试编辑文件时,我收到以下消息:

E325: ATTENTION Found a swap file by the name ".myfile.swp" While opening file "myfile.html" dated: Tue Jul 3 09:55:39 2012

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

Swap file ".myfile.html.swp" already exists!



myfile.html 是否有任何损坏?

我认为正在发生的是它在我退出 session (交换文件)时存储了打开文件的副本?

最佳答案

来自 Vim documentation :

Vim stores the things you changed in a swap file. Using the original file you started from plus the swap file you can mostly recover your work.



该文档还描述了 the recovery procedure万一你需要它。

关于unix - 什么是交换文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11313639/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com