大家好,又見面了,我是你們的朋友全棧君。
先貼一下錯誤提示
E325: ATTENTION
Found a swap file by the name
".nginx.conf.default.swp"
owned by: root dated:Sat Apr 5 08:11:44 2014
file name: /opt/nginx/conf/nginx.conf
modified: YES
user name: root host name: localhost.localdomain
process ID: 1343
While opening file "nginx.conf.default"
dated: Sat Apr 5 08:13:44 2014
NEWER than swap file!
複制
問題出在使用vi編輯nginx配置檔案時,網絡不穩定斷開與伺服器連接配接,再次連接配接編輯檔案是提示以上錯誤。
查詢相關的資料發現是這是由于在編輯該檔案的時異常退出,而vim在編輯檔案時會建立一個交換檔案swap file以保證檔案的安全性。
是以在再每次打開這個檔案都會出現這個警告,為了去掉這個警告,我們隻需要删除這個swap檔案即可。
由于改檔案是隐藏的,ll 指令查詢不出來
我們可以使用ls -la 查詢,然後rm -rf .nginx.conf.default.swp即可
釋出者:全棧程式員棧長,轉載請注明出處:https://javaforall.cn/144457.html原文連結:https://javaforall.cn