Created
April 8, 2018 03:06
-
-
Save the-paulus/e403b942b26cf7b033a64bb3c15859f4 to your computer and use it in GitHub Desktop.
Commands to erase bash history
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Clears bash history | |
cat /dev/null > ~/.bash_history | |
# Prevent history from being recorded | |
ln -s ~/.bash_history /dev/null | |
# A copy of the history is stored in memory and written to the file uppon logout. | |
# To get around this: | |
cat /dev/null > ~/.bash_history && history -c && exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment