help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bash history


From: Dave Close
Subject: bash history
Date: Wed, 07 Oct 2026 12:53:25 -0700

On most of my Fedora systems, bash remembers the last commands entered
prior to a restart. After the system restarts, a new bash window shows
the last previous command when I press the up-arrow key and multiple
presses continue to show previous commands in reverse order.

On one system only, nothing happens when I press that key. On that
one system after I've entered commands, up-arrow shows the previous
commands in reverse order as I expect. Except that it doesn't go back
beyond the first new command after the restart. This happens on each
new bash window on that system, even after other windows have started
to respond to the up-arrow key.

On both the working systems and the one misbehaving, I see:

$  set | grep HIST
HISTCONTROL=ignoredups
HISTFILE='~/.bash_history'
HISTFILESIZE=1000
HISTSIZE=1000

On the working systems I see:

$ ls -l .bash_history
-rw------- 1 dave dave 17552 2026-10-06 12:50 .bash_history
$ shopt | grep ^hist
histappend              off
histreedit              off
histverify              off

On the misbehaving system I see:

$ ls -l .bash_history
-rw------- 1 dave dave 20001 2026-02-02 21:16 .bash_history
$ shopt | grep ^hist
histappend              on
histreedit              off
histverify              off

Note that on the misbehaving system the .bash_history file is NOT
updated. But it's not truncated, either. The file exists and is not
empty so why don't I get some ancient command when I press up-arrow?

Please clue me in.
-- 
         Dave Close, Compata, Irvine CA       +1 714 434 7359
       dave@compata.com              dhclose@alumni.caltech.edu
   "History repeats itself.
    That's one of the things wrong with history." -- Clarence Darrow




reply via email to

[Prev in Thread] Current Thread [Next in Thread]