Which of the changes introduced in F21 might affect bash history?

John Florian john.florian at dart.biz
Mon Feb 16 14:20:07 UTC 2015

> -----Original Message-----
> From: devel-bounces at lists.fedoraproject.org [mailto:devel-
> bounces at lists.fedoraproject.org] On Behalf Of drago01
> Sent: Monday, February 16, 2015 04:45
> To: Development discussions related to Fedora
> Subject: Re: Which of the changes introduced in F21 might affect bash
> history?
> On Mon, Feb 16, 2015 at 9:34 AM, Alexander Ploumistos
> <alex.ploumistos at gmail.com> wrote:
> > Hello,
> >
> > I have upgraded 3 systems to a nonproduct F21 and I have installed F21
> > to a couple of others using the x86_64 Live Workstation image. They
> > all suffer from intermittent losses of bash history. When the machines
> > are booted or rebooted, more than half the times, there are commands
> > missing from .bash_history files. It's not only that the previous
> > sessions have not been appended to the files, entire portions of the
> > files are wiped on occasion, e.g. history files that were more than
> > 2000 lines long are now reduced to just a couple of commands.
> >
> > There was a bug filed against systemd during F21 testing (#1170765),
> > where I followed up, but I have no idea if systemd really is to blame
> > or if there is something else that could be touching history files. I
> > have read the release notes as well as the system administrator's
> > guide, but couldn't find anything relevant. Does anyone have any idea
> > what might be off here? Which system components are involved in
> > terminal history management?
> Bash ... the last closes session "wins" so if you have multiple shells
> open one might overwrite the history of the other one.

True, unless you have "shopt -s histappend".  I have that and like others started seeing unexplained losses starting w/ F21. I have so many fires going right now that I wasn't sure if I was just imagining this or not.  I'm sort of glad to hear I'm not alone.

On another almost related note, I've never had any luck convincing bash to honor my desire for a very large HISTSIZE despite unsetting HISTFILESIZE but I've not looked into that issue for several years.  I'd love to dig up commands I used several years ago even if I have to grep an auxiliary history file; I don't mind dedicated several MB to this.  I mostly made the problem go away by starting a personal wiki but that requires more effort.

John Florian

More information about the devel mailing list