View previous topic :: View next topic |
Author |
Message |
drakonite l33t
Joined: 02 Nov 2002 Posts: 768 Location: Lincoln, NE
|
Posted: Tue Aug 26, 2003 11:41 am Post subject: Increasing command history size. |
|
|
How do you change the number of commands BASH stores in the history?
I've gotten to the point that I easily enter more commands than BASH stores in it's history in a few hours of normal usage, which makes me unable to use the history for repeating commands I haven't typed in a few hours.. (big time saver when it actually works...) _________________ Shoot Pixels Not People
My GPG/PGP Public key |
|
Back to top |
|
|
Vergo n00b
Joined: 19 Apr 2003 Posts: 42 Location: Oulu, Finland
|
Posted: Tue Aug 26, 2003 11:55 am Post subject: |
|
|
From the bash man page:
Quote: | HISTFILESIZE
The maximum number of lines contained in the history file. When
this variable is assigned a value, the history file is trun-
cated, if necessary, to contain no more than that number of
lines. The default value is 500. The history file is also
truncated to this size after writing it when an interactive
shell exits. |
and there's also
Quote: | HISTSIZE
The number of commands to remember in the command history. The default value is 500. |
so you could for example add
Code: | export HISTFILESIZE="1000"
export HISTSIZE="1000" |
to /etc/profile or ~/.bash_profile |
|
Back to top |
|
|
drakonite l33t
Joined: 02 Nov 2002 Posts: 768 Location: Lincoln, NE
|
Posted: Tue Aug 26, 2003 12:16 pm Post subject: |
|
|
Thanks! I tried reading through the man page but everything seemed to be command line options and I didn't think about putting them in .profile.. _________________ Shoot Pixels Not People
My GPG/PGP Public key |
|
Back to top |
|
|
|