vim编辑文件警告Swap file already exists ,如何删除vim编辑产生的.swp文件?查看隐藏文件命令
vim编辑文件警告Swap file already exists,如何删除vim编辑产生的.swp文件?查看隐藏文件命令
Linux(centos7)下多个用户同时编辑一个文件,或编辑时非正常关闭,再下次编辑打开文件时均为显示如下警告信息:
E325: ATTENTION
Found a swap file by the name ".other.conf.swp"
owned by: root dated: Wed Nov 29 02:23:20 2017
file name: /usr/local/nginx/conf/other.conf
modified: YES
user name: root host name: host.localdomain
process ID: 19783 (still running)
While opening file "other.conf"
dated: Wed Nov 29 02:28:57 2017
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 other.conf"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file ".other.conf.swp"
to avoid this message.
Swap file ".other.conf.swp" already exists!
[O]pen Read-Only, (E)dit anyway, (R)ecover, (Q)uit, (A)bort:
-----------------------------
使用命令查看隐藏swp文件(隐藏文件都以.开头):
ls -a
查看当前目录下与打开的文件同名的.swp文件,如.other.conf显示为.other.conf.swp
使用rm -rf删除这个.swp文件,当再打开test.xml文件时,便不会弹出警告信息。
# rm -rf .other.conf.swp
vim编辑文件警告Swap file already exists ,如何删除vim编辑产生的.swp文件?查看隐藏文件命令的更多相关文章
- 删除编辑文件警告Swap file “…” already exists!
Linux下多个用户同时编辑一个文件,或编辑时非正常关闭,再下次编辑打开文件时均为显示如下警告信息: Swap file "test.xml.swp" already exists ...
- vim 编辑提示swap file already exists 解决方法
linux服务器上编辑 .ini 文件时卡死,关闭连接工具后重新进入操作该 .ini 文件时,会提示: E325: ATTENTION Found a swap file by the name &q ...
- VIM:Found a swap file by the name
在linux下用vi或vim打开Test.java文件时 [root@localhost tmp]# vi Test.java出现了如下信息: E325: ATTENTION Found a s ...
- linux下vi或vim操作Found a swap file by the name的原因及解决方法
在linux下用vi或vim打开Test.java文件时 [root@localhost tmp]# vi Test.java出现了如下信息: E325: ATTENTION Found a s ...
- 'swap file "xx" exists' linux
solution: 1)swap to another tty, kill processes using 'sudo kill -9 pid' 2)'Recover' the 'warn-openn ...
- linux(2)文件和目录管理(新增,删除,复制,移动,文件和目录权限,文件查找)
一.目录与路径 1.相对路径与绝对路径绝对路径:/开头, cd /usr相对路径:cd ../..2.目录操作(cd:change directory).:当前目录..:上一层目录-:上一个目录~:当 ...
- 【Linux】E297: Write error in swap file 解决办法
今天登陆到服务器上,发现通过vi 打开文件就会报错: E297: Write error in swap file E303: Unable to open swap file for "c ...
- swp文件已存在
vim编辑某个文件时,提示.xxx.sh.swp文件已存在是因为异常退出后,linux会生成一个swp文件,无论选择什么,下次进入还是会提示ll 命令无法看到文件使用 rm -rf .xxx.sh.s ...
- .swp文件的恢复
.swp 编辑文件的过程中会出现这个隐藏文件. 文件如果正常保存,.swp就会自动删除.如果不正常退出,比如关机,.swp就会留下来. linux下: ls -all 可以查看隐藏文件 命令: vi ...
随机推荐
- passwd 修改密码
[root@localhost ~]# passwd # 修改 root 用户的密码 [root@localhost ~]# passwd test # 修改指定用户的密码
- 微信公开课厦门站 时尚行业专场PPT
做为一位开发者,ytkah有幸参加了微信公开课厦门站-时尚行业专场,见证了微信支付的发展历程,小程序产品的实力简介,感受了一下与各位高手共聚一堂的氛围,当然还近距离接触了著名主持人兼NPC潮品(与潘玮 ...
- 表单样式form.css
/**附件样式表.*/div.attachement{ float:left; overflow:hidden; padding:3px 0 0 15px; white-space:nowrap; } ...
- vue 点击当前的标签,获取当前标签的value值
点击当前的标签,获取当前标签的value值 html <p class="title" v-for="(item, i) in items" :key=& ...
- ES7 async 函数
async 函数 let getdata=function(){ return new Promise((resolve,reject)=>{ resolve('aaa'); }) } let ...
- 【Linux】-NO.9.Linux.5.Nexus.1.001-【CentOS 7 Install Nexus 3.3】-
1.0.0 Summary Tittle:[Linux]-NO.9.Linux.5.Nexus.1.001-[CentOS 7 Install Nexus 3.3]- Style:Linux Seri ...
- Pytorch快速入门及在线体验
本文搭配了Pytorch在线环境,可以直接在线体验. Pytorch是Facebook 的 AI 研究团队发布了一个基于 Python的科学计算包,旨在服务两类场合: 1.替代numpy发挥GPU潜能 ...
- shell的函数返回值
1.默认function的返回值包含0 和1,执行成功,返回0,执行失败,返回1,可以采用$?来获取执行结果 2.函数如何返回字符串呢,可以采用echo函数 #!/bin/bashfunction t ...
- 查看CPU信息
基础知识 示例: 开发机器是1个物理CPU,4核8线程,Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz 基础 i3:2核模拟4线程,无睿频 i5:4核模拟4线程,有睿频 ...
- calibur处理ROSETTA输出的多个结构文件,clustering
下载网址:https://sourceforge.net/projects/calibur/ 安装: $ tar zxvf calibur.tar.gz $ cd calibur $ make 安装完 ...