terminal search through command history code example Example: find old command terminal history | grep "foo*"