bloggalerietagcloudalleslinks

sudo write with vim

In case you edited a file only writable by root (or another user) in vim with an unprivileged user and now want to save it without using a temporary file (and copying back this files using sudo afterward), just issue the following command instead of ':w':

:w !sudo tee %
Ähnliche Beiträge:
Manpage direkt aus VIM aufrufen
List all GCC standard defines
Tagcloud
pf ruleset (neu) laden
Unter OpenBSD sshd und sendmail neu starten
Kommentare (3)  Permalink

Kommentare

stony @ 06.04.2010 09:48 CEST
hat super funktioniert!
tobias @ 06.04.2010 10:11 CEST
Auch unter die vim-Nutzer gegangen? :-)
stony @ 06.04.2010 20:57 CEST
jawohl!!!
Keine (weiteren) neuen Kommentare erlaubt.