Hacker News new | ask | show | jobs
by nurb 3437 days ago
Another trick is to use "!!" which is the last command launched, especially useful if you forgot a "sudo" in front of your command, just write

  sudo !!
In the same way, "!*" is all the arguments of your previous command, and "!$" only the last one.
1 comments

Came here to mention the sudo-bang-bang trick, which really has the best name of all the commands I know.