

HISTSIZE determines how many lines will get written to the history file.

Anything older (which could potentially grow the list past $HISTSIZE) is wiped away.įor most cases there's no need to set HISTFILESIZE independently of HISTSIZE. With HISTSIZE at default (probably 500) your history file is always getting overwritten by the most recent $HISTSIZE commands. This is the reason you're seeing no effect. If HISTFILESIZE is larger than your HISTSIZE, you'll never see more than your HISTSIZE because the file is getting overwritten with HISTSIZE commands ( unless you set history to append, but that is a separate topic: look up histappend in shell builtin commands for that). HISTSIZE is what determines how many lines get saved at the end of a session. The problem is HISTFILESIZE only sets the maximum history stored to file when you startup a session.

# Saves 10 million lines in memory and in the bash history file. This will configure both the in-memory history and the file-based history. All you need to do is set HISTSIZE in your bash profile ( ~/.bash_profile).
