Advertisement
mendel

bash history protection

Feb 14th, 2014
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. # only append to history
  2. shopt -s histappend
  3. # keep one meelion lines in memory
  4. export HISTSIZE=1000000
  5. # and in the file
  6. export HISTFILESIZE=$HISTSIZE
  7. # prevent shell instances that don't have these set from clobbering the real history
  8. export HISTFILE=~/.bash_history_safe
  9. # timestamps are nice
  10. export HISTTIMEFORMAT='%F %T '
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement