LoginSignup
162
146

More than 5 years have passed since last update.

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

Last updated at Posted at 2018-10-19

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

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

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

:w !sudo tee %

その後に、強制脱出装置

:q!

上書きできてる!

URL

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

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

162
146
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
162
146