java JBoss 日志目录中的 swo 和 swp 文件是什么?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5039545/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What are swo and swp files in JBoss log dir?
提问by IAdapter
I have files
我有文件
server.log
.server.log.swo
.server.log.swp
how to open swo and swp?
如何打开swo和swp?
回答by Devon_C_Miller
Those are temporary files created by the vim editor. The .swp is created when a file is opened in the editor. The .swo is created if the file is edited and the .swp already exists. Edit it a third time and you get a .swn, and so on. When vim is closed, those files should go away. If vim crashes or is killed, they may be left behind. They are safe to ignore.
这些是由 vim 编辑器创建的临时文件。在编辑器中打开文件时会创建 .swp。如果编辑了文件并且 .swp 已经存在,则会创建 .swo。第三次编辑它,你会得到一个 .swn,依此类推。当 vim 关闭时,这些文件应该消失。如果 vim 崩溃或被杀死,它们可能会被抛在后面。他们可以安全地忽略。
回答by user1543544
the files remain even after vim is closed we need to use vim in recover mode, save and then move the files to a different name. then delete the .sw* files.
即使vim关闭后文件仍然存在,我们需要在恢复模式下使用vim,保存然后将文件移动到不同的名称。然后删除 .sw* 文件。