search bash history code example
Example 1: show bash history
history # show all
history | tail -5 # show last 5
history | grep text # search for text
Example 2: bash search history hstr
sudo add-apt-repository ppa:ultradvorka/ppa && sudo apt-get update && sudo apt-get install hstr && hstr --show-configuration >> ~/.bashrc && . ~/.bashrc