当我在linux下用vi打开Test.java文件时

[root@localhost tmp]# vi Test.java

会出现如下信息:

  1. E325: ATTENTION
  2. Found a swap file by the name ".Test.java.swp"
  3. owned by: root   dated: Wed Dec  7 13:52:56 2011
  4. file name: /var/tmp/Test.java
  5. modified: YES
  6. user name: root   host name: localhost
  7. process ID: 26153 (still running)
  8. While opening file "Test.java"
  9. dated: Wed Dec  7 14:00:46 2011
  10. NEWER than swap file!
  11. (1) Another program may be editing the same file.
  12. If this is the case, be careful not to end up with two
  13. different instances of the same file when making changes.
  14. Quit, or continue with caution.
  15. (2) An edit session for this file crashed.
  16. If this is the case, use ":recover" or "vim -r Test.java"
  17. to recover the changes (see ":help recovery").
  18. If you did this already, delete the swap file ".Test.java.swp"
  19. to avoid this message.
  20. "Test.java" 11L, 237C
  21. Press ENTER or type command to continue

原因是我之前有一次使用vi 操作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]#

转自:http://chenzhou123520.iteye.com/blog/1313585

最新文章

  1. 6.DNS公司PC访问外网的设置 + 主DNS服务器和辅助DNS服务器的配置
  2. ASP.net MVC 文件下载的几种方法(欢迎讨论)
  3. getPhysicalNumberOfCells 与 getLastCellNum的区别
  4. Python升级Yum不能使用解决
  5. 剑指offer系列20--从上到下打印二叉树
  6. Swing多线程
  7. 龙芯将两款 CPU 核开源,这意味着什么?
  8. xslt语法之---position()函数
  9. wxpython 中的所有控件及高级应用
  10. Android TextWatcher应用实例
  11. 让程序在崩溃时体面的退出之Dump文件
  12. TFS 2012使用简介
  13. ado vb6
  14. 关于eclipse创建Maven项目创建的问题
  15. Struts2请求参数合法性校验机制
  16. 登录界面Demo
  17. 分页查询最好加排序(order by)
  18. 个人阅读作业LAST
  19. Spark笔记之使用UDAF(User Defined Aggregate Function)
  20. adb shell dumpsys的使用

热门文章

  1. 全键盘操作Windows
  2. 「SCOI2011」糖果
  3. CSS 浮动和清除
  4. 【noip模拟赛1】古韵之刺绣
  5. 【LeetCode】142. Linked List Cycle II
  6. 搞不清FastCgi与php-fpm之间是个什么样的关系
  7. 使用Metasploit工作区
  8. Redis五大类型操作使用以及订阅发布功能
  9. BZOJ4242 : 水壶
  10. SQL Server Management Studio 教程二: 创建新登录名