viでファイルを開いたときに「E325: ATTENTION」というメッセージが表示されるときがあります。
同時に同じファイルを編集しようとしているか、ファイルが壊れている場合に出るメッセージのようです。
例)
このようなメッセージが出ます。
Found a swap file by the name "/etc/sysconfig/.iptables.swp"
owned by: root dated: Tue Apr 24 09:29:25 2012
file name: /etc/sysconfig/iptables
modified: no
user name: hogehoge host name: example.com
process ID: 11949 (still running)
While opening file "/etc/sysconfig/iptables"
dated: Tue Apr 24 14:17:36 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 /etc/sysconfig/iptables"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file "/etc/sysconfig/.iptables.swp"
to avoid this message.
"/etc/sysconfig/iptables" 39L, 1398C
E486: Pattern not found: etc
Press ENTER or type command to continue
(1)は他のプログラムが同じファイルを編集している可能性あり。
(2)はファイルが壊れていてスワップファイルが存在する場合。
スワップファイルは下記のように消せます。
rm: remove 通常ファイル `/etc/sysconfig/.iptables.swp’? y
スワップファイルを戻したい場合は
人気記事一覧
- MySQL 最大の値・最新の日付データを1つ抽出する方法(MAX)
- [CakePHP] XformHelperの使い方
- Linux: スワップファイル(swp)の削除方法
- HTMLのForm methodとactionについて
- PHPでカンマ区切りデータを配列に入れる方法 (explode)
- [エラー対処] failed to open stream: No such file or directory
- [CSS]ブロック要素(div)の高さを、内部のfloat要素に合わせて自動調整する
- [vsftp] FileZillaから接続できない場合の対処法
- PHP5.1→PHP5.3へバージョンアップする方法(CentOS)
- PHPでテキストを1行ずつ読み込む方法(file_get_contents,explode)
関連記事一覧
- [XAMPP] .htaccess設定
- MySQLのバックアップ(dump)
- Linux ファイルの検索
- PEARパッケージインストール時に「No valid packages found install failed」が出るときの対処
- [エラー対処] failed to open stream: No such file or directory
- ファイルに連番をつけるソフト(連番リネーム)
- [CakePHP2]Formのバリデーションを切る(HTML5)
- [CakePHP] View::element() テンプレート・Viewに広告を表示
- PHPスクリプトの開始時刻・終了時刻をDBに登録してチェック(Cron)
- バーチャルホスト(複数ドメイン運用)で.htaccessを使えるようにする方法