Are you missing "sudo" on commands in terminal? Don't worry.
Sometimes you are in your terminal and need to type a command that requires you to have root powers. Well I don't know you, but I sometimes forget to put sudo in front of those commands. Look at this example:
$ rm somefile
rm: somenewfile: Permission denied
I have some options here. I could retype the entire command or use arrow up and go to the beginning of the line adding "sudo" to it. But a better way to fix my mistake is using the operator "!!". Like this:
$ rm somefile
rm: somenewfile: Permission denied
$ sudo !!
$ sudo rm newfile
Amazing, your file "newfile" is now removed.
Enjoy.
Written by Mariz Melo
Related protips
2 Responses

The history expansion character (! by default in bash) can do lots of cool things:
http://www.thegeekstuff.com/2011/08/bash-history-expansion/
Formal reference:
http://www.gnu.org/software/bash/manual/bashref.html#History-Interaction

this is great :') thank you!