Ever had a situation where you opened a file for editing, made some changes, and discovered that you don’t have the rights to write the file? This happens to me.
Wanted to run a command in sudo context but forgot that. What do you do usually? Hit the up arrow Press ctrl+a or HOME button Type sudo and hit ENTER. There is a geekier way to do this. 🙂 Type: Bash will expand the two exclamation points to the previous command and it will… Continue reading Geekier way to run the previous command with sudo
In bash you can place redirections almost anywhere in the command. All these are equivalent: Try it Pretty cool, right? 🙂