Home > tech > Bash History Tip For People With No Memory

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.

ben tech

  1. Nik
    April 10th, 2009 at 03:23 | #1

    Awesome, I love it!
    Thanks man!