On Sun, Jan 27, 2008 at 05:27:26PM -0600, Denny White wrote:
> 
> I've read the ksh man page, googled for days, & can't seem to come
> up with the answer. Either I put no mention of HISTFILE and HISTSIZE
> in $HOME/.profile and I don't have a lasting history file of previous
> commands. Or, I put it in and I do have a history file, but the
> HISTSIZE setting has no effect. It doesn't change and the file grows
> and grows. Currently I have it set as shown below to save my command
> line history:
> 
> HISTFILE=.ksh_history
> HISTSIZE="50"
> 
> I've tried using .ksh_history$$ to have a different file each login,
> and know I can run a cronjob nightly to clean them up if I want to,
> but I can't figure out how to make the history turn over just like
> it's supposed to with the HISTSIZE value without all that other mess.
> Thanks for any help I can get on this.
> 

notice that the variable is named "HISTSIZE", not "HISTFILESIZE" :)

HISTSIZE affects how many commands are kept in history (in memory - not
file). so, for example, if you set HISTSIZE=3 you'll only be able to
recall the past 3 commands in history. it does not turn over HISTFILE,
however.

i'm a bit confused by this myself, though - it does seem logical that
the HISTFILE not store more commands than history itself is able to
recall. i can;t tell by looking at the code what goes on in there -
maybe someone else can chip in...

jmc

Reply via email to