I just noticed that a lot of entries are missing from my bash command history (the .bash_history file).
I'd like to know:
- if there is a way to find out why commands are missing from the file (like a lack of disk space; I could not find hints in /var/log/syslog)
- if there are ways, issues or ongoing work to make sure that the bash history always reliably includes all executed bash commands - for example by copying a backup of the latest .bash_history file before overwriting it, doing so after every executed command and having a filesize-buffer in case disk space gets too low
The .bashrc file already has HISTSIZE and HISTFILESIZE set to very large values. I have backups of the .bash_history file.
shopt histappend? If is not set the last shell to close overwrites whatever other shells have added.histappend on. If that isn't the default setting that would be yet another problem.diffthe backups, do they only differ at the end or also at the beginning and/or middle of the files? Also what are te outputs ofsudo grep -r '^HIST' /etc/*andgrep '^HIST' ~/\.*?/etc/skel/.bashrc:HISTCONTROL=ignoreboth /etc/skel/.bashrc:HISTSIZE=1000 /etc/skel/.bashrc:HISTFILESIZE=2000 /etc/sysstat/sysstat:HISTORY=7&/home/username/.bashrc:HISTCONTROL=ignoreboth /home/username/.bashrc:HISTSIZE=100000 /home/username/.bashrc:HISTFILESIZE=200000