$HISTSIZE
This command helps you to determine the number of commands history in your current environment. By default, in most distributions it is 500 or 1000.
Syntax:
Look at the above snapshot, our system has 1000 commands in command history.
You can also change the number of commands in command history if you want.
Syntax:
Example:
Look at the above snapshot, we have changed the number of commands in our command history.
HISTFILE
This command points to the file that contains your history. Its default value in bash shell is ~/.bash_history.
Syntax:
Look at the above snapshot, it shows the file containing history.
$HISTFILESIZE
This command helps to set the number of commands kept in your history file.
Syntax:
Example:
Look at the above snapshot, we have changed the HISTFILESIZE from 2200 to 2500.