1. 程式人生 > >E325: ATTENTION     Found a swap file by the name ".Test.java.swp"

E325: ATTENTION     Found a swap file by the name ".Test.java.swp"

在linux下用vi或vim開啟Test.java檔案時


[[email protected] 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是一個隱藏檔案。


注:以.開頭的檔案就是隱藏檔案


想要不再有上面的警告提示,把該檔案刪除即可:


[[email protected] tmp]# rm .Test.java.swp
rm: remove regular file `.Test.java.swp'? y
[[email protected] tmp]#
使用vi或vim編輯其他檔案出現類似情況的處理方法一樣可以。
--------------------- 
作者:kenhins 
來源:CSDN 
原文:https://blog.csdn.net/kenhins/article/details/50781071 
版權宣告:本文為博主原創文章,轉載請附上博文連結!

相關推薦

E325: ATTENTION     Found a swap file by the name ".Test.java.swp"

在linux下用vi或vim開啟Test.java檔案時 [[email protected] tmp]# vi Test.java 出現瞭如下資訊: E325: ATTENTION     Found a swap file by the name ".T

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"          owned by: root &n

vim Found a swap file by the name ".LinkDemo.cpp.swp"

問題: 在vi檔案的時候出現Found a swap file by the name ".LinkDemo.cpp.swp" 原因: 中途編輯檔案時網路中斷了,之後目錄產生了一個檔案  .LinkDemo.cpp.swp 這是一個隱藏檔案,用命令 ls -a 可以檢視

linux下Found a swap file by the name解決

vim編輯檔案時提示 Found a swap file by the name …… .swp檔案是在vi編輯檔案時產生的一個臨時檔案,在編輯過程中過一段時間自動儲存一次。如果意外退出,比如在vi編輯檔案過程中退出系統(意外關機、直接關閉了Shell終端等情況),該檔案就會存在,下

vi/vim開啟檔案提示Found a swap file by the name

問題分析 有一次在遠端連線主機時,用vi開啟檔案my.ini卻提示:Found a swap file by the name ".my.ini.swp"。百度了下才知道,原來在使用vi或vim命令開啟一個檔案後,就會產生一個.(filename).swp的檔案。如果編輯完成之後,正常退出,那麼這個swp檔

vi/vim打開文件提示Found a swap file by the name

配置 htm name linux 都是 恢復文件 .vimrc iteye 出現 問題分析 有一次在遠程連接主機時,用vi打開文件my.ini卻提示:Found a swap file by the name ".my.ini.swp"。百度了下才知道,原來在使用vi或v

iOS開發之Found a swap file by the name ".podfile.swp" owned by: Netban dated: Fri Mar 24 13...

Found a swap file by the name ".podfile.swp" owned by: Netban dated: Fri Mar 24 13:57:27 2017 file name: ~Netban/Desktop/StudentGrowth/podfi

Creating a swap file with Chef

In case anyone else needs this, here is my Chef snippet to create a swap file: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 script 'create swapfile'

Android之Error: 'L' is not a valid file-based resource name character解決辦法

copyto base logo lower too exec article 問題 tools 1、問題 [html] view plain copy Error:Execution failed for task ‘:mergeBYODReleaseR

If ngModel is used within a form tag, either the name attribute must be set or the form contro

背景:angular中使用form表單時報錯。 報錯資訊:If ngModel is used within a form tag, either the name attribute must be set or the form control must b

安裝MYSQL出錯:a windows service with the name MYSQL already...service.

安裝mysql5.5,安裝時提示:a windows service with the name MySQL already exists.Please uninstall this servic

eplise中運行提示 A fatal error has been detected by the java runtime environment

mage image 截圖 src fatal env 分享圖片 detect 版本 今天一同事出現運行項目時,提示 A fatal error has been detected by the java runtime environment,具體表現是使用我們框架,不能

打包造成The packaging for this project did not assign a file to the build artifact -> [Help 1]

今天在家打包遇見The packaging for this project did not assign a file to the build artifact 仔細看了一下發現今天腦抽了在Plugins下打包...打包應該在Lifecycle裡的 兩處打包,而非Plugin

android studio方法總數超過64K報錯Error:The number of method references in a .dex file cannot exceed 64K.

開發中記錄點滴 1.問題描述 Error:The number of method references in a .dex file cannot exceed 64K. Error:Execution failed for task ':app:transformC

mvn 打jar包異常:The packaging for this project did not assign a file to the build artifact -> [Help 1]

idea maven打包 install 報錯,資訊如下: 這是說找不到外掛的包,其實不是找不到這個打包外掛,而是自己的專案沒有從maven倉庫里加載這個包到專案裡, idea中打包maven專案,有兩個install;其實本人很菜鳥,一直就用Plugins下的ins

Github bug: a lock file already exists in the repository

解決方案: This may be an old reply but I'm hoping this is more useful on next who need this solution. On linux/unix/gitbash/cygwin, try rm -f .git/i

Error:The number of method references in a .dex file cannot exceed 64K.

收到一封google admob 寄來的信: 說要增加下面的code, 廣告在過了 2016-09-15 才會繼續放送: apply plugin: ‘com.android.application’ … dependencies {     compile ‘com.google.android.gms

待解決:A fatal error has been detected by the Java Runtime Environment

Tomcat 崩潰日誌: # # A fatal error has been detected by the Java Runtime Environment: # #  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x1db7ae66

maven install報錯:The packaging for this project did not assign a file to the build artifact

IDEA進行mvn install時,遇到以下錯誤 The packaging for this project did not assign a file to the build artif

intellij中maven專案 報錯 The packaging for this project did not assign a file to the build artifact

是run configuration -> maven -> preject name -> Parameters -> command line中是install:install. 改成install就可以了.或者是run configuration