bash history command 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
sudo add-apt-repository ppa:ultradvorka/ppa && sudo apt-get update && sudo apt-get install hstr && hstr --show-configuration >> ~/.bashrc && . ~/.bashrc
Example 3: linux history command
Just check the enumeration of your commands history and then delete them:
history -d 7 #Deletes seventh command in your history list