Monday, August 30, 2010

Linux Tip of the Day - sudo saving within VIM

ointer; cursor:hand;width: 54px; height: 66px; border: 0px;">


I browse a lot of files across different servers with different configurations. It is very helpful for me to be able to save changes I've made to a file I've opened with limited read only privileges. The last thing I want to do is save to a temprorary file and overwrite the target file with the temp file.

:w !sudo tee %

Thanks to the Ubuntu Forums and user singlow