The 10 Bash commands that help you rule the world

Bash icon

In a time where shellshock make cry many Linux administrators, i want to remember what bash can do for us I've collected some of the bash commands that characterize the most advanced functionalities of bourne again shell.

$ sudo !!
Recall the last command with the power of superuser

$ echo "<command>" | at 12pm
Start the command at midnight, need atd daemon

$ ctrl-r
Reverse-i-search search reversed every digit in the command history

$ ssh [email protected] cat /path/to/remotefile | diff /path/to/localfile -
Check the differences over the remote file and the local one

$ ctrl-l
Clear the screen, it's the same as type clear

$ ssh -t reachable_host ssh unreachable_host
Make an ssh connection with a host in the middle

$ less +F logfile
Call less in follow mode, act like tail -f  appending the new content at end of file

# nc -v -l 80 < file.ext
Host the file.ext over http port, need superuser privileges

$ disown -a && exit
Detach all the background process and exit from shell

$ echo "!!" >
Write the last command in the file with the shell's output redirection

You can find more usefully commands at Commandlinefu