Re: Vanishing history
Reply #2 –
It seems to look OK, and has been working otherwise. I don't see any command near the top of the new short bash_history file that would account for this, if it had been mistakenly deleted then that command would be saved when the terminal that issued it was closed, and I almost always do file operations on the command line, apart from deleting photos in a viewer, and my Thunar isn't set to show hidden files, so it's very unlikely (although nothing is impossible) to be a fat finger incident. I ran a btrfs scrub recently which came back clean, the only other possibility I can think of is if a terminal got left open at shutdown (and things like that do happen here on rare occasions... ) and something went wrong because of that.
$ set |grep HIST
HISTFILE=/home/me/.bash_history
HISTFILESIZE=20000
HISTSIZE=10000
$ set |grep hist
BASHOPTS=checkwinsize:cmdhist:complete_fullquote:expand_aliases:extglob:extquote:force_fignore:histappend:interactive_comments:progcomp:promptvars:sourcepath
HISTFILE=/home/me/.bash_history
SHELLOPTS=braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor
$ shopt -p |grep hist
shopt -s cmdhist
shopt -s histappend
shopt -u histreedit
shopt -u histverify
shopt -u lithist