How To Limit The Size Of The User History Files On Linux

  • 3935362
  • 09-May-2007
  • 30-Apr-2012

Environment

Novell Open Enterprise Server (Linux based)
Novell Open Enterprise Server (OES) Support Pack 1 Linux
Novell SUSE Linux Enterprise Server 9
Novell SUSE Linux Enterprise Server 10
Novell SUSE Linux Enterprise Desktop 10

Situation

Desire to limit the history file size for each user in the system.

Resolution

The HISTFILESIZE and HISTSIZE environment variables need to be set for each user. This can be set in the /etc/profile.local or the /etc/bash.bashrc.local files with the following commands:

export HISTFILESIZE=
export HISTSIZE=