a guest Mar 20th, 2017 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- # /etc/profile.d/best_bash_history.sh
- # Save 5,000 lines of history in memory
- # Save 2,000,000 lines of history to disk (will have to grep ~/.bash_history for full listing)
- # Append to history instead of overwrite
- shopt -s histappend
- # Ignore redundant or space commands
- # Ignore more
- HISTIGNORE='ls:ll:ls -alh:pwd:clear:history'
- # Set time format
- HISTTIMEFORMAT='%F %T '
- # Multiple commands on one line show up as a single line
- shopt -s cmdhist
- # Append new history lines, clear the history list, re-read the history list, print prompt.
- export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"
RAW Paste Data