Save a file you edited in vim without the needed permissionsI often forget to sudo before editing a file I don't have write permissions on. When you come to save that file and get the infamous "E212: Can't open file for writing", just issue that vim command in order to save the file without the need to save it to a temp file and then copy it back again. :w !sudo tee % Annotated link http://www.diigo.com/bookmark/http%3A%2F%2Fwww.commandlinefu.com%2Fcommands%2Fbrowse%2Fsort-by-votes
commandlinefu.com is the place to record those command-line gems that you return to again and again. Delete that bloated snippets file you've been using and share your personal repository with the world. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.