Ever type a command and get an error like this?
john@ubuntu:/etc$ mv hosts.tar.gz bosts.tar.gz; tar -xvvzf bosts.tar.gz; ls -l | wc -l
mv: cannot move `hosts' to `bosts': Permission denied
Instead of retyping the code with a "sudo" command in front, just type:
john@ubuntu:/etc$ sudo !!
The double bang argument makes sudo run the last command as if sudo had been invoked first.