Saturday, March 8, 2008

Change bash history size

HISTSIZE sets the number of commands to remember in the command history and HISTFILESIZE sets the number of lines to store in the command history file, default is 500 for both. So to change the size of your history add the following to your shell initialisation file: export HISTSIZE=1000
export HISTFILESIZE=1000
Also, use histappend so that the history file is appended to rather than overwritten: shopt -s histappend

Sources

  • man bash

No comments:

Post a Comment