Quantcast
Viewing all articles
Browse latest Browse all 2901

Beginners Questions • Re: Clear my bash history on Debian 12?

rm ~/.bash_history, touch ~/.bash_history and chmod 0600 ~/.bash_history to set the permissions correctly on the file where bash keeps the history.
Easier to just null the file in-place, e.g.

Code:

 > ~/.bash_history
or more verbosely:

Code:

cat /dev/null >~/.bash_history
than remove and recreate it.

Statistics: Posted by steve_v — 2024-06-24 00:46



Viewing all articles
Browse latest Browse all 2901

Trending Articles