4/17/13

Increase your Bash History Size


Increase your Bash History Size

Using the history command (for example joined with a grep) lets you relax your brain and fingers. Sure, even more relaxed is the usage of the reverse-search-history function (Ctrl-R).

To make sure the history's brain isn't to small, you should increase its size. The following lines need to be added to your ~/.bashrc file. It increases the history to the last 10.000 commands, erases previous duplicates and makes sure that the commands are appended (and do no override) on shell exit:

1export HISTSIZE=10000
2export HISTCONTROL=erasedups
3shopt -s histappend

No comments: