View previous topic :: View next topic |
Author |
Message |
sdauth l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/8853292075e233da65d745.jpg)
Joined: 19 Sep 2018 Posts: 616 Location: Ásgarðr
|
Posted: Wed Jul 03, 2024 7:18 pm Post subject: bash-5.2_p26-r6 HISTSIZE & HISTFILESIZE variables |
|
|
Hello,
With bash-5.2_p26-r6, if I don't set HISTSIZE & HISTFILESIZE in my ~/.bashrc; I observe the creation of lot of .bash_history-******.tmp files appearing randomly (some even empty) in my ~/
This wasn't needed with previous bash-5.1 series. Or at least I never observed this behaviour.
I was finally able to solve the issue by setting those variables in my ~/.bashrc. I added HISTCONTROL too for good measure.
HISTCONTROL=ignorespace:ignoredups
HISTSIZE=10000
HISTFILESIZE=20000
If anyone have an explanation or maybe it is unrelated and just coincidence.. At least if it can help anyone with the same issue, that's a good thing.
Cheers |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
RumpletonBongworth n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/8203944486671b670cce7b.png)
Joined: 17 Jun 2024 Posts: 62
|
Posted: Wed Jul 03, 2024 9:28 pm Post subject: |
|
|
I noticed some lingering temporary files on one of my machines, dating from several months ago. As far as I can tell, nothing has changed in 5.2 that would make it any more or less likely for one of the syscalls to fail in such a way that a temporary file remains. It could have just been an anomaly but I did notice something potentially interesting: the length of the temporary files was exactly that of the values of HISTSIZE and HISTFILESIZE at the time. I don't have an explanation for this but it's on my radar, so to speak. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
sdauth l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/8853292075e233da65d745.jpg)
Joined: 19 Sep 2018 Posts: 616 Location: Ásgarðr
|
Posted: Fri Jul 05, 2024 3:47 pm Post subject: |
|
|
RumpletonBongworth wrote: | the length of the temporary files was exactly that of the values of HISTSIZE and HISTFILESIZE at the time. I don't have an explanation for this but it's on my radar, so to speak. |
Interesting, what values were you using when you noticed this ?
I think the default is 500 for HISTSIZE (when not set in ~/.bashrc)
In Debian, the default ~/.bashrc set the following :
Code: | # for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000 |
Which seems too low because I have the same issue with Debian if I use these values.
Instead I set :
Code: | # for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=10000
HISTFILESIZE=20000 |
And no more tmp files cluttering my home folder. (like hundred of them..)
Strangely the issue started to happen with Debian bookworm (12), current stable, which introduced bash 5.2. With oldstable (Bullseye), I never saw those history tmp files. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|