LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-25-2005, 07:41 AM   #1
calutateo
Member
 
Registered: May 2004
Location: Spain
Distribution: SuSE9x
Posts: 40

Rep: Reputation: 15
HISTFILE versus HISTFILESIZE


Dear all,

The variables HISTSIZE and HISTFILESIZE both seem to define the maximum number of lines in .bash_history.

"man bash" states the following:
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.
HISTSIZE
The number of commands to remember in the command history (see
HISTORY below). The default value is 500.
So what is the difference?
Is it sufficient to assign just one of them?
Any good link where those variables are explained?

While googling I found the following RHCE question at http://certcities.com/editorial/popq...ditorialsID=42
Quote:
In the bash shell, command history is controlled by which group of the following environment variables?

A. HISTFILE, HISTSIZE, HISTFILESIZE
B. HISTFILE, HISTFILESIZE, EDITOR
C. HISTSIZE, HISTOPTIONS, EDITOR
D. HISTSIZE, HISTFILESIZE, EDITOR
My answer would rather be
E. HISTCMD, HISTFILE, HISTSIZE, HISTFILESIZE

Regards,
Carsten
 
Old 07-25-2005, 09:55 AM   #2
mattLSO
Member
 
Registered: Jun 2005
Posts: 43

Rep: Reputation: 15
The answer is definitly a, I guess your custom answer is a bit more pedantic, however you are right both HISTFILESIZE and HISTSIZE do indeed seem to perform the same function a quick experiment will prove this.

It is sufficient to assign just one of them.

Regards
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
suse 8.1 versus 8.0 vera Linux - Networking 1 06-08-2004 11:00 AM
RPM -U versus -F - which should be used MSwal2846 Linux - Newbie 6 03-15-2004 01:21 AM
ppp versus pppd J_Szucs Linux - Networking 12 01-23-2004 08:53 AM
Qt versus GTK hpcpg Programming 6 01-12-2004 04:43 PM
Mandrake 9.0 versus 9.1 Captain Kernel Linux - Newbie 3 11-01-2003 06:50 AM


All times are GMT -5. The time now is 02:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration