Sponsored Content
Full Discussion: HISTSIZE and HISTFILESIZE
Top Forums UNIX for Dummies Questions & Answers HISTSIZE and HISTFILESIZE Post 302691577 by King Clarity on Saturday 25th of August 2012 01:33:01 AM
Old 08-25-2012
Read the question properly

Dude, you didn't answer the actual question. Try reading it again.

The question was what is the difference between HISTSIZE and HISTFILESIZE.

The OP is right, the bash man page is somewhat confusing, it states:
Code:
HISTFILESIZE
      The maximum number of lines contained in the history file.   When  this  variable  is  assigned  a
      value,  the history file is truncated, if necessary, by removing the oldest entries, 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.

which sound kinda similar.

pandeesh - the answer is you can use either if you want to increase the number of items in your history; however HISTFILESIZE refers specifically to the actual history file itself (e.g. ~/.bash_history) which is written when the shell exits. HISTSIZE refers specifically to history as saved in memory.
These 2 Users Gave Thanks to King Clarity For This Post:
 

We Also Found This Discussion For You

1. UNIX for Advanced & Expert Users

HISTSIZE environment variable problem

Hi All, I am connecting to a sun solaris 5.9 unix (korn shell) server using the x terminal. There is some problem with the HISTORY File where the HISTSIZE env variable is not working. Although the HISTSIZE is set to 20 already but the HISTORY file keep increasing and exceeded the size. There... (5 Replies)
Discussion started by: Kenneth2006
5 Replies
LIBBASH(7)							  libbash Manual							LIBBASH(7)

NAME
libbash -- A bash shared libraries package. DESCRIPTION
libbash is a package that enables bash dynamic-like shared libraries. Actually its a tool for managing bash scripts whose functions you may want to load and use in scripts of your own. It contains a 'dynamic loader' for the shared libraries ( ldbash(1)), a configuration tool (ldbashconfig(8)), and some libraries. Using ldbash(1) you are able to load loadable bash libraries, such as getopts(1) and hashstash(1). A bash shared library that can be loaded using ldbash(1) must answer 4 requirments: 1. It must be installed in $LIBBASH_PREFIX/lib/bash (default is /usr/lib/bash). 2. It must contain a line that begins with '#EXPORT='. That line will contain (after the '=') a list of functions that the library exports. I.e. all the function that will be usable after loading that library will be listed in that line. 3. It must contain a line that begins with '#REQUIRE='. That line will contain (after the '=') a list of bash libraries that are required for our library. I.e. every bash library that is in use in our bash library must be listed there. 4. The library must be listed (For more information, see ldbashconfig(8)). Basic guidelines for writing library of your own: 1. Be aware, that your library will be actually sourced. So, basically, it should contain (i.e define) only functions. 2. Try to declare all variables intended for internal use as local. 3. Global variables and functions that are intended for internal use (i.e are not defined in '#EXPORT=') should begin with: __<library_name>_ For example, internal function myfoosort of hashstash library should be named as __hashstash_myfoosort This helps to avoid conflicts in global name space when using libraries that come from different vendors. 4. See html manual for full version of this guide. AUTHORS
Hai Zaar <haizaar@haizaar.com> Gil Ran <ril@ran4.net> SEE ALSO
ldbash(1), ldbashconfig(8), getopts(1), hashstash(1) colors(1) messages(1) urlcoding(1) locks(1) Linux Epoch Linux
All times are GMT -4. The time now is 10:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy