Last active
March 13, 2020 10:06
-
-
Save wheresjames/7894051b52589a731e880276462a429f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Add to ~/.bashrc | |
HISTCONTROL=ignoreboth:erasedups | |
shopt -s histappend | |
HISTSIZE=100000 | |
HISTFILESIZE=200000 | |
PROMPT_COMMAND="history -n; history -w; history -c; history -r"; $PROMPT_COMMAND | |
# Run from command line to clear duplicates from .bash_history | |
history -w && tac ~/.bash_history | awk '!x[$0]++' > ~/.bash_history.tmp && tac ~/.bash_history.tmp > ~/.bash_history && history -c && history -r |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment