bash history commands code example
Example 1: show bash history
history # show all
history | tail -5 # show last 5
history | grep text # search for text
Example 2: 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