The !! in unix grabs the last executed command. It prints both the command and the output on the terminal.

Example:

Code:
> ls -lrt | tail -1
drwxrwsr-x   2 dsp  dsp    2 Mar 18 13:10 linux_distro

> !!
ls -lrt | tail -1
drwxrwsr-x   2 dsp  dsp   2 Mar 18 13:10 linux_distro
To execute the last command as root user, then run the following command:

Code:
> sudo !!