Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Increasing command history size.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
drakonite
l33t
l33t


Joined: 02 Nov 2002
Posts: 768
Location: Lincoln, NE

PostPosted: Tue Aug 26, 2003 11:41 am    Post subject: Increasing command history size. Reply with quote

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
View user's profile Send private message
Vergo
n00b
n00b


Joined: 19 Apr 2003
Posts: 42
Location: Oulu, Finland

PostPosted: Tue Aug 26, 2003 11:55 am    Post subject: Reply with quote

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
View user's profile Send private message
drakonite
l33t
l33t


Joined: 02 Nov 2002
Posts: 768
Location: Lincoln, NE

PostPosted: Tue Aug 26, 2003 12:16 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum