On Thursday 11 December 2008 00:10, David C. Rankin wrote:
Listmates,
Is there any way to Save .bash_history command to file when HISTSIZE= limit is reached? ...
Thanks.
Here's what I came up with after a message on this thread tipped me off about the "-a" option to BASH's built-in "history" command (the first block of environment settings were all I was using before these changes). The attached file is an excerpt from my .bashrc. Note the three variations on when to save new (since the most recent save) history entries. One is based on time intervals, the other on the number of commands added to the history since the previous save and the last, the one I'm using for now, updates the history file after each (elligible) command. In this variant, commands from my many shells will be interleaved across all shells (and I have many open and use them all frequently). It remains to be seen if I like that result, but it seems the best option.
-- David C. Rankin
Randall Schulz