Linux vim編輯器開啟檔案警告E325: ATTENTION解決

來源:互聯網
上載者:User

  在使用vim編輯檔案過程中,因為斷網導致遠程登陸伺服器失敗。網路連接恢複後,再次登陸伺服器,vi開啟檔案,警示,提示資訊如下:

E325: ATTENTION
Found a swap file by the name ".cpu.sh.swp"
          owned by: work   dated: Fri Nov 23 11:17:23 2012
         file name: ~work/fanbo/server/dialogue/cpu.sh
          modified: YES
         user name: work   host name: db-testing-ps6056.db01.baidu.com
        process ID: 16358
While opening file "cpu.sh"
             dated: Fri Nov 23 16:35:41 2012
      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 cpu.sh"
    to recover the changes (see ":help recovery").
    If you did this already, delete the swap file ".cpu.sh.swp"
    to avoid this message.

Swap file ".cpu.sh.swp" already exists!
[O]pen Read-Only, (E)dit anyway, (R)ecover, (Q)uit, (A)bort, (D)elete it: 

原因分析,因為在編輯過程中會產生緩衝檔案,如果沒有執行":w",而因為網路連接斷開,會在目前的目錄下產生一個以檔案名稱swp結尾的隱藏檔案。刪除這個檔案,再次用vi開啟就不會警示,但檔案會復原到編輯前的狀態。

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.