.bash_history file is not current to output of history
Having an issue with my .bash_history file. It's certainly not a crisis, but it's been bothering me ever since I noticed it.
Say I look at my bash history by just getting onto a terminal and doing Code:
history Code:
vim /home/toor/.bash_history I remember typing both sets of commands, but the output from the command 'history' is much more current than is the file that it's presumably reading from to present it to me via my terminal! So what gives? My OS is Linux Mint; as far as I can recall, the two files are synced on Fedora, but it's been a while since I've used that. If anyone's dealt with, noticed this problem I'd appreciate any tips for getting them synchronized with one another. -Matt |
Quote:
|
There are several parameters which affect your bash history. Have a look at these (and there are more too):-
HISTCONTROL=ignorespace HISTFILE=/home/username/.bash_history HISTFILESIZE=2000 HISTSIZE=2000 and do a "man bash" to see what each parameter refers to. |
On top of the two previous suggestions you may find
Code:
shopt -s histappend Cheers, Tink |
Sincere thanks for the help!
|
All times are GMT -5. The time now is 11:49 AM. |