解决Swap file ".ceshi.c.swp" already exists!问题
2017-08-10 08:57
405 查看
关于swp文件:使用vi,常常能够看到swp这个文件,那这个文件是怎么产生的呢。当你打开一个文件,vi就会生成这么一个.(filename)swp文件以备不測,假设你正常退出,那么这个.(filename)swp文件将会自己主动删除。
因此.(filename)swp文件就是你没有正常退出vi或者vim编辑器时留下来的!
比方:强行关闭vi或vim时。电源突然断掉,或者你使用了Ctrl-zz。(正常的退出方式应该是Shift-ZZ)
这时候就会出现以下的情况了
重点:解决的方法
用以下的命令删除swp文件
rm .{your file name}.swp
比如:我的文件名称是ceshi.c 那么就用这种命令:rm .ceshi.c.swp (当然你前面也能够加-rf强制删除)
问: (vi 一个文件时怎么样能够不让它产生.swp文件?或不让他提示【“Swap file ".文件名称.swp" already exists![O]pen Read-Only, (E)dit anyway, (R)ecover, (Q)uit:】)
处理方法: 打开 vi /etc/vimrc 并在末尾加入 set noswapfile 后保存退出 OK
因此.(filename)swp文件就是你没有正常退出vi或者vim编辑器时留下来的!
比方:强行关闭vi或vim时。电源突然断掉,或者你使用了Ctrl-zz。(正常的退出方式应该是Shift-ZZ)
这时候就会出现以下的情况了
<span style="font-family:SimSun;color:#ffffff;background-color: rgb(0, 0, 0);">E325: ATTENTION Found a swap file by the name ".ceshi.c.swp" owned by: root dated: Sat Jul 4 19:51:46 2015 file name: /c/ceshi.c modified: YES user name: root host name: c66-WR process ID: 2801 While opening file "ceshi.c" dated: Sun Jul 5 12:38:54 2015 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 ceshi.c" to recover the changes (see ":help recovery"). If you did this already, delete the swap file ".ceshi.c.swp" to avoid this message. Swap file ".ceshi.c.swp" already exists! [O]pen Read-Only, (E)dit anyway, (R)ecover, (Q)uit:</span>
重点:解决的方法
用以下的命令删除swp文件
rm .{your file name}.swp
比如:我的文件名称是ceshi.c 那么就用这种命令:rm .ceshi.c.swp (当然你前面也能够加-rf强制删除)
问: (vi 一个文件时怎么样能够不让它产生.swp文件?或不让他提示【“Swap file ".文件名称.swp" already exists![O]pen Read-Only, (E)dit anyway, (R)ecover, (Q)uit:】)
处理方法: 打开 vi /etc/vimrc 并在末尾加入 set noswapfile 后保存退出 OK
相关文章推荐
- 解决Swap file ".ceshi.c.swp" already exists!问题
- swap file "*.swp" already exists!的解决方法
- swap file "*.swp" already exists!的解决方法
- Swap file "/etc/.hosts.swp" already exists! [O]pen Read-Only, (E)dit anyway, (R)ecover, (D)elete it,
- swap file "*.swp" already exists!的解决方法
- Swap file ".Podfile.swp" already exists!
- Swap file "..."already exists! 故障解决办法
- Git-解释“Swap file .MERGE_MSG.swp already exists”的问题
- iOS开发Debug之“Swap file ".podfile.swp" already exists! ”
- lftp下载文件无法覆盖,提示" file already existst and xfer:clobber is unset" 问题解决
- linux编辑文件出现Swap file ".server.xml.swp" already exists!
- Swap file ".Podfile.swp" already exists!
- ios开发之 -- Swap file ".Podfile.swp" already exists!
- weblogic8.1向weblogic9.2移植的Bean already exists: "weblogic.j2ee.descriptor.ServletMappingBeanImpl问题!
- Project property "XFire services.xml path" does not refer to a valid file问题解决
- hadoop "File /user/<user>/input/conf/slaves could only be replicated to 0 nodes, instead of 1"问题及解决办
- File already exists: filesystem '/path/file', transaction svn常见错误解决方法
- Swap file ".." already exists!
- lftp下载文件无法覆盖,提示" file already existst and xfer:clobber is unset" 问题解决
- "Unable to get buffer of resource asset file"问题的解决