Bash History Tip For People With No Memory
April 8th, 2009
I have no memory, not sure why, but i can’t remember anything… ever.
This means I often go through my .bash_history file looking for login info or various other items. To make this process easier i added the following alias to my .bash_profile (os x) or my .bashrc (ubuntu) file.
alias wtf="more ~/.bash_history | grep"
This lets me type in wtf mysql and it finds all entries in my history matching mysql. Plus there is the added bonus of being able to type in wtf mysql all the time.
Awesome, I love it!
Thanks man!