Long, long ago, I asked this of the forum and today, I found this simple set of commands:
https://www.howtoforge.com/clear-bash-history/
The article is very short but I quote from it:
I normally have a few commands in the bash history that I use daily, my "workhorse" commands. However, occasionally I will do a lot of bash commands and my daily set is pushed way down the list and it become time consuming to step back through the history. So then I clear the bash history and re-enter my daily workhorse commands.
Hopefully this will help you in a similar way.
https://www.howtoforge.com/clear-bash-history/
The article is very short but I quote from it:
To clear the Bash History on Linux, use this combination of 3 commands:
What do these commands do?
Code:
cat /dev/null > ~/.bash_history && history -c && exit
- The 'cat' command empties the .bash_history file of the currently logged in user.
- The 'history -c' command cleans the history of the current user session.
- The 'exit' command quits the current session.
Hopefully this will help you in a similar way.
Comment