Bug 39838 - bash truncates ~/.bash_history to 9999 lines despite of $HISTFILESIZE
Summary: bash truncates ~/.bash_history to 9999 lines despite of $HISTFILESIZE
Status: NEW
Alias: None
Product: Sisyphus
Classification: Development
Component: bash4 (show other bugs)
Version: unstable
Hardware: all Linux
: P5 normal
Assignee: placeholder@altlinux.org
QA Contact: qa-sisyphus
Depends on:
Reported: 2021-03-25 16:56 MSK by Vladimir D. Seleznev
Modified: 2021-03-25 16:56 MSK (History)
3 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir D. Seleznev 2021-03-25 16:56:54 MSK
When $HISTFILESIZE is set in ~/.bashrc (or any other bash user initialization file), bash during the login session respects its value and truncates ~/.bash_history (I assume the default $HISTFILE) when its line number exceeds $HISTFILESIZE. But with new user login bash truncates ~/.bash_history to 9999 lines, it is very annoying when $HISTFILESIZE is greater that 9999.

HISTFILESIZE=9999 is set in /etc/profile but I think bash handles it too early that it should.