Hack 55. Control the total number of lines in the history using HISTSIZE

by Ramesh

Append the following two lines to the .bash_profile and relogin to the bash shell again to see the change. In this example, only 450 command will be stored in the bash history.

  1. # vi ~/.bash_profile
  2.  
  3. HISTSIZE=450
  4. HISTFILESIZE=450