Advertisement
Guest User

Untitled

a guest
Mar 20th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. # /etc/profile.d/best_bash_history.sh
  2. # Save 5,000 lines of history in memory
  3. HISTSIZE=10000
  4. # Save 2,000,000 lines of history to disk (will have to grep ~/.bash_history for full listing)
  5. HISTFILESIZE=2000000
  6. # Append to history instead of overwrite
  7. shopt -s histappend
  8. # Ignore redundant or space commands
  9. HISTCONTROL=ignoreboth
  10. # Ignore more
  11. HISTIGNORE='ls:ll:ls -alh:pwd:clear:history'
  12. # Set time format
  13. HISTTIMEFORMAT='%F %T '
  14. # Multiple commands on one line show up as a single line
  15. shopt -s cmdhist
  16. # Append new history lines, clear the history list, re-read the history list, print prompt.
  17. export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement