VIM:Found a swap file by the name
在linux下用vi或vim打开Test.java文件时
[root@localhost tmp]# vi Test.java
出现了如下信息:
E325: ATTENTION
Found a swap file by the name ".Test.java.swp"
owned by: root dated: Wed Dec 7 13:52:56 2011
file name: /var/tmp/Test.java
modified: YES
user name: root host name: localhost
process ID: 26153 (still running)
While opening file "Test.java"
dated: Wed Dec 7 14:00:46 2011
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.java"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file ".Test.java.swp"
to avoid this message.
"Test.java" 11L, 237C
Press ENTER or type command to continue
原因是在此次vi或vim操作前有过一次使用vi或vim 操作Test.java文件时出现了异常中断,所以在当前目录下产生了一个.Test.java.swp文件,这个文件使用ls命令查看不能发现,使用ls -a命令查看可以知道Test.java.swp是一个隐藏文件。
注:以.开头的文件就是隐藏文件
想要不再有上面的警告提示,把该文件删除即可:加上那个.
[root@localhost tmp]# rm .Test.java.swp
rm: remove regular file `.Test.java.swp'? y
[root@localhost tmp]#
使用vi或vim编辑其他文件出现类似情况的处理方法一样可以。
VIM:Found a swap file by the name的更多相关文章
- vim编辑文件警告Swap file already exists ,如何删除vim编辑产生的.swp文件?查看隐藏文件命令
vim编辑文件警告Swap file already exists,如何删除vim编辑产生的.swp文件?查看隐藏文件命令 Linux(centos7)下多个用户同时编辑一个文件,或编辑时非正常关闭, ...
- 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 ...
- vim/vm命令后提示错误:Found a swap file by the name ".dockerfile.swp"
今天在使用docker时,使用vim命令操作dockerfile文件,提示如下错误: 错误原因,是由于上一次在操作该文件时,异常退出,然后系统生成了一个dockerfile.swp文件,该文件是个隐藏 ...
- vi/vim打开文件提示Found a swap file by the name
问题分析 有一次在远程连接主机时,用vi打开文件my.ini却提示:Found a swap file by the name ".my.ini.swp".百度了下才知道,原来在使 ...
- vim 设置 swap file, 防止 同一个文件同时被多次打开,而且有恢复的功效
在.vimrc里加入: set swapfile 即可以使能swap file, swapfile的名字一般是 .filename.swp (如 .doc.txt.sw ...
- linux下vi编辑某文件时,操作出现 错误提示: E325: ATTENTION 2, Found a swap file by the name ".p1.c.swp"
当我在linux下用vi打开p1.c文件时 root@iZ2zeeailqvwws5dcuivdbZ:~/1/01/指针# vi p1.c 会出现如下信息: E325: ATTENTION Found ...
- linux进行文件vim编辑时没有退出文件直接关闭出现E325: ATTENTION Found a swap file by the name "/usr/local/php/etc/.php.ini.swp"
E325: ATTENTIONFound a swap file by the name "/usr/local/php/etc/.php.ini.swp" ow ...
- vim编辑时遇到E325: ATTENTION Found a swap file by the name "./.backu.sh.swp"错误代码的解决办法
vim编辑时遇到E325: ATTENTION Found a swap file by the name "./.backu.sh.swp"错误代码的解决办法 重点:解决方法是: ...
- vim 编辑提示swap file already exists 解决方法
linux服务器上编辑 .ini 文件时卡死,关闭连接工具后重新进入操作该 .ini 文件时,会提示: E325: ATTENTION Found a swap file by the name &q ...
随机推荐
- [la P4487] Exclusive-OR
[la P4487] Exclusive-OR Time limit 3000 ms OS Linux You are not given n non-negative integers X0, X ...
- Java编程思想--控制执行流程
java控制流程设计的关键字包括if-else,while,do-while,for,return,break,continue以及switch.(go-to) 1.while在迭代之前计算一次布尔表 ...
- 网页链接跳转qq聊天界面以及QQ群是什么实现的
网页可以唤起QQ群,这我们都知道可以做到,那如何唤起呢?下面就做一个简单的介绍,希望可以帮助到有需要的朋友 1.官方提供的几种加群的链接 官方的加群代码的获取前提是我们具有权限(也就是群主或管理权限) ...
- _net之美 记录笔记
第一章: Valpoint vPoint1=new Valpoint(); Console.WriteLine(vPoint1.x); 1.=号左边ValPoint vPoint1,在线程上创建一个V ...
- [NOIP2014D1]
T1 Problem 洛谷 Solution 一道非常裸的模拟题.直接枚举每次猜拳就可以了. Code #include<cmath> #include<cstdio> #in ...
- 并查集(POJ1182)
链接:http://poj.org/problem?id=1182 定义一种关系R(x,y),x > y 时 R(x,y) = 2:x = y 时 R(x,y)= 1:x < y 时 R( ...
- logging dictconfig
#coding: utf-8 import logging import logging.config class SingleLevelFilter(object): def __ini ...
- 微信退款回调AES算法(AES-256-ECB)
解密步骤如下: (1)对加密串A做base64解码,得到加密串B (2)对商户key做md5,得到32位小写key* ( key设置路径:微信商户平台(pay.weixin.qq.com)--> ...
- java知识点总结--java开发环境搭建
安装 JDK(Java Development Kit) 和开发工具 如:eclipse,myeclipse,idea等 配置系统环境变量 查看系统环境变量 1.通过 我的电脑--->“属性”- ...
- QT_REQUIER_CONFIG
在qglobal.h中,定义了很多宏.下面这个QT_REQUIER_CONFIG,展开成: #define QT_REQUIRE_CONFIG(feature) Q_STATIC_ASSERT_X(Q ...