[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Thanks all] - Re: Seeing command history when using MATE terminal



On Saturday, April 18, 2020 07:52:23 AM Richard Owlett wrote:
> On 04/18/2020 05:19 AM, Richard Owlett wrote:
> > I can see any *ONE* previous commands by using the up-arrow key.
> > But I need to see the *complete* history. F1 is no "Help".
> > Obviously its stored in a file. Where?
> > TIA
> 
> Using 'cat ~/.bash_history' gives desired format (i.e. without the line
> numbers prepended by the 'history' command).
> 
> There's one thing I don't understand - erasure of previous history.
> 
>   https://mywiki.wooledge.org/BashFAQ/088 states it as:
> > ... it overwrites the existing history with the new version.
> 
> What I actually see goes back over several uses of the MATE terminal
> including multiple power off/on cycles. Not that I object, it is my
> desired result.

I believe that is because when a terminal starts it loads the existing 
contents of the $HISTFILE.  (Then, as stated in other posts, it is saved when 
the terminal is closed.  

But there is a limit to the number of command lines saved in any instance of 
bash (any terminal), and when commands exceed that limit, the oldest are 
dropped.

$HISTSIZE is the limit in within a terminal, the default is 500 -- setting it 
to a negative number makes it unlimited

$HISTFILESIZE is a limit on the size of the command history file (in lines)


Reply to: