LoginSignup
0
0

More than 1 year has passed since last update.

vi操作中のE325: ATTENTIONエラー対処法

Posted at

経緯

vi操作中にCtrl+Zを押してしまい、ジョブ停止してしまったなと思い、再度viで対象のファイルを開こうとしたらE325: ATTENTIONエラーが出力されました。

対処法

E325: ATTENTION
    Found a swap file by the name ".httpd.conf.swp" ※SWAPファイルが作成されているみたい
owned by: root   dated: Wed Nov 02 18:39:43 2022
file name: /etc/httpd/conf/httpd.conf
modified: YES
user name: root   host name: XX.XX.XX.XX
process ID: 186908 (STILL RUNNING)
While opening file "httpd.conf"
dated: Wed Nov 02 18:35:06 2022

(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 httpd.conf"
    to recover the changes (see ":help recovery").
    If you did this already, delete the swap file ".httpd.conf.swp"
    to avoid this message.

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

SWAPファイルが作成されているからこのSWAPファイルをどうにかしないと、本家のファイルが開けないよってことになる。対処法としてSWAPファイルを削除してしまえば解決する。
ただ、SWAPファイルが隠れているのでls -laで確認し、削除すること

# cd /etc/httpd/conf/ ⇒上記のfile name: /etc/httpd/conf/のフォルダまで移動する
# ls -la
-rw-r--r-- 1 root root 16384 Nov  2 18:39 .httpd.conf.swp
# rm -f .httpd.conf.swp

事象解決

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0