logoalt Hacker News

mzajclast Friday at 10:56 AM1 replyview on HN

Better yet, `shopt -s 'histappend'` in your .bashrc and `chattr +a .bash_history`. This will still allow bash to add to the history, but it won't be able to trim the file.


Replies

mmsclast Friday at 2:27 PM

Yes! And for macOS, `chflags uappnd .bash_history`