How to Enlarge Bash History Size

I know everyone loves using previous commands that they enter to the bash terminal.

These previous commands are stored in a file (~/.bash_history) and we call them "history". Nonetheless, by default the size of history is 500, but I have lots of space and memory to handle a larger history file.

Here is how you can resize your history to 15000;

1. Open your .bashrc or .bash_profile which reside in your user(~) directory.
2. Add "export HISTSIZE=15000"
3. (Optional) If you are running very long commands and want to limit the size of history file as well add "export HISTFILESIZE=2000000". This is 2MB.
4. Save your profile file.
5. Either run "source .bashrc" or just close and reopen your bash terminal.

Now your bash terminal is like an elephant, it does not (literally) forget what she saw :)


Popular posts from this blog

Space Character Problem on IE 6, 7, and 8

Configure hosts File in Android

AWS encryption chart (SSE-S3 vs SSE-KMS vs SSE-C)