search prebioud command ternimal code example
Example 1: find old command terminal
history | grep "foo*"
Example 2: ubuntu search for command used
> grep "the_search" ~/.bash_history
--Don't forget the -i flag if you need case insensitive search.