Tips & Tricks


$ history



2039 uname -a | grep Linux
2040 dmesg
2041 clear
2042 cd bin
2043 clear
2044 pwd
2045 touch new_binary
2046 sudo touch new_binary
2047 ls new_binary
2048 history

$ !2039
uname -a | grep Linux
Linux himanshu-Inspiron-1525 3.2.0-36-generic-pae #57-Ubuntu SMP Tue Jan 8 22:01:06 UTC 2013 i686 i686 i386 GNU/Linux

So we see that command number 2039 was run through single exclamation ‘!’ without having to type or copy paste the command again.

Go Back to Menu