[How To] Change history settings in your Unix Terminal.

The history command in Unix comes in handy when you want to view the recently entered commands on the terminal.

According to the man page, history expansions introduce words from the history list into the input stream, making it easy to repeat commands, insert the arguments to a previous command into the current input line, or fix errors in previous commands quickly.


Hence history list is basically an array of the recently used commands.


Tweaking the history settings on your terminal.

Sometimes, you may want to tweak the settings on your Unix terminal to custom specify the number of history commands it saves. You may want to increase/decrease it. 

The HISTSIZE command can be used to increase/decrease the number of commands in the history to be saved.

Suppose you wish to set the history size to 100, you can type in below command:
$ HISTSIZE=100;

The below image illustrates the same:
Tweaking the history command options (click on the image to enlarge).









Comments / Views?