When I open my .bash_history file and view my previous commands via the history command, I see that they are not the same exact commands ?

I feel like the .bash_history commands contains less commands, is it because the .bash_history is updated every 24 hours or so ?

Also I wonder is there a limit for the number of commands to appear in my history or .bash_history file ?


What a particular process keeps in memory for the history will vary with what is in a history file depending on a variety of settings and commands, notably the HISTCONTROL, HISTFILE, HISTFILESIZE, HISTIGNORE, and HISTSIZE environment variables, and the fc and history commands, though the history section of the manual will doubtless make for better reading than this.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.