On 9/7/24 6:04 AM, Dmytro Bagrii wrote:

Bash Version: 5.2
Patch Level: 32
Release Status: release

Description:
Sometimes .bash_history-XXXXX.tmp file remains present in $HOME directory.

Both ~/.bash_history and ~.bash_history-XXXXX.tmp are 65536 lines long, as specified by $HISTFILESIZE. ~/.bash_history-XXXXX.tmp contain older commands and doesn't contain more recent commands, as expected.

After manual removal of ~/.bash_history-XXXXX.tmp after some time new tmp file emerges.

This doesn't seem like the whole story. You probably have PROMPT_COMMAND
set to append the history at every command (otherwise, the temp file would
not `reappear' after some time).

It looks like one of the writes or renames fails, so the history library
leaves the temp file there in case it needs to be manually modified, but
a subsequent write succeeds, updating the `real' history file.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to