LoginSignup
148

More than 3 years have passed since last update.

posted at

updated at

[vim]read only のファイルをsudoで強制的に保存する

サーバを触ってて良く出てくるくせに毎回忘れるのでメモ

E45 readonly option is set(add ! to override)が出たら

入力モードをescで抜ける
コマンドモードで下記を実行

:w !sudo tee %

その後に、強制脱出装置

:q!

上書きできてる!

URL

runlevel 5 に入るところでCentOSがこける

vim :: readonly のファイルを sudo で強制的に保存する [Tipsというかメモ]

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
What you can do with signing up
148