Created
October 31, 2019 12:24
-
-
Save aakbar5/5218d580763cca72592ee34b3ef303f3 to your computer and use it in GitHub Desktop.
Ubuntu: Bash history management
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
# To see top commands | |
history | awk '{print $2}' | sort | uniq -c | sort -rn | head | |
# To remove a commands from history | |
# Replace YOUR_COMMAND with the initials of the command you want to remove from bash history | |
sed -i '/^YOUR_COMMAND/d' ~/.bash_history |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment