more ~/.bash_history
Indicators of Modified History File:
.bash_history
does not exist or is empty = history logging is disabled or has been cleared.
- Check the user's
.bashrc
or.bash_profile
files for settings that control history behavior:
grep 'HISTSIZE\|HISTFILESIZE\|HISTIGNORE\|HISTCONTROL' ~/.bashrc ~/.bash_profile
-
HISTSIZE
andHISTFILESIZE
: These control the number of commands stored in memory and on disk, respectively.Indicators of Disabled History:
HISTSIZE
orHISTFILESIZE
= 0, disables history loggingunset HISTFILE
= prevents the history from being saved to a file.
-
HISTIGNORE
: Specifies patterns of commands to ignore. -
HISTCONTROL
: Can include options likeignorespace
(ignore commands that start with a space) orignoredups
(ignore duplicate commands).