If you want to find a command that you used before but you have a huge history list, you can quickly find it by passing it through grep. Let’s say we remember typing the ftp command, but can’t remember the domain name of the server:
1 ps -ef2 kill 241883 ps -ef4 tail logfile.log
Pretty simple stuff! What if we want to display the list of items that we use the most often? We can use a much more complicated command like this:
321 ftp ftp.cdrom18.com
The last command was thanks to Lifehacker, which is a great site you should definitely subscribe to.
114 ls105 ./runreports.sh97 cd24 uptime15 mysql13 vi
The techniques used in the last command are useful in other contexts. I’ll be posting more similar commands going forwards.