You are not logged in.
Hi,
I have had this in my bashrc for years:
export HISTSIZE=10000
export HISTFILESIZE=20000
shopt -s histappend
export PROMPT_COMMAND='history -a'
It's always worked fine, until recently. Now the history accumulates as it should during the session and even when I leave bash, but then it gets truncated to 500 lines every time I reboot which is infuriating.
Can anybody point me in the right direction?
Cheers!
Offline
I recommend setting HISTFILE to something other than ~/.bash_history and seeing if the truncating still occurs.
Offline
Make sure there are no systax errors in your .bashrc and it is being fully parsed.
One day while playing with my bash config I added a function (having syntax errors) at the top of my bashrc, opened a new terminal window, played around and after logout history file had only 500 lines.
So if there is an error before "HIST" lines, HITSIZE variable will default to 500 and "that" will happen.
Offline
Possibly relevant:
history-size (unset)
Set the maximum number of history entries saved in the history list. If set to zero, any existing history entries are deleted and no new entries are saved. If set to a value less than zero, the number of history entries is not limited. By default, the number of history entries is set to the value of the HISTSIZE shell variable. If an attempt is made to set history-size to a non-numeric value, the maximum number of history entries will be set to 500.
Offline