Bash Scrollback # of lines option

In Bash the default number of lines in the history file is 1000. I would change it to 4096 through selecting:
Edit: Profiles: Default Edit Scrolling and then change the number of scrollback lines.

In previous versions it worked however in this version 11.4 I don’t see the number of lines change in the history file.

I checked /etc/bash.bashrc and ~/.bashrc and couldn’t find anything that would create that limit.

You can set HISTSIZE in your environment. I guess the default is 1000.

echo $HISTSIZE

However it is different from the number of scrollback lines. This is a property of the terminal.

  • For gnome-terminal, you can configure it in the Profile preferences -> Scrolling.
  • For Xfce terminal, under Terminal Preferences -> General - Scrollback.
  • For Kde konsole, Settings -> Configure Current Profile -> Scrollling
  • xterm an rxvt like terminals have a SaveLines
    resource that you can set in your ~/.Xdefaults or ~/.Xresources.

On 01/30/2012 10:56 AM, please try again wrote:
>
> However it is different from the number of scrollback lines. This is a
> property of the terminal.

you can try adding this to your /home/[your]/.bashrc


HISTSIZE=2000

please-try-again raises new to me info (which is not surprising as he
knows a lot more than i do) and i am not sure how scrollback and history
mesh (maybe you can set scrollback alone, or histsize alone or must set
both to cover all possibilities [like, what happens if you boot to
runlevel 3 and all you have done is set the scrollback for all possible
X supported terminals]–i do NOT know!)

and, i guess if you (in a root powered terminal) put the HISTSIZE line
in /etc/bashrc.local (create that file if needed), you would cause it to
be in effect for all system users, including root (which wouldn’t be
affected by the same line in your home’s bashrc…

there are probably several ways to skin this cat…and, i’m not sure
which way is either ‘best’ or ‘correct’, but:

Have a lot of fun!


DD
Read what Distro Watch writes: http://tinyurl.com/SUSEonDW

On 2012-01-30 11:27, DenverD wrote:

> please-try-again raises new to me info (which is not surprising as he knows
> a lot more than i do) and i am not sure how scrollback and history mesh
> (maybe you can set scrollback alone, or histsize alone or must set both to
> cover all possibilities [like, what happens if you boot to runlevel 3 and
> all you have done is set the scrollback for all possible X supported
> terminals]–i do NOT know!)

The history buffer you can see by pushing the up-arrow, and it is the
history of the commands you entered. This is controlled by bash, and is
written on exit to .bash_history. Once you have the line you want (you can
only see a line at a time) you can edit it. There are commands to
manipulate or search the command history.

The scrollback buffer is instead stored in the actual terminal you use to
access bash: console, xterm, etc. It is usually accessed by pushing
shift-pgup (or the mouse). It contains not only the commands you entered,
but also the output of those commands, and is not editable.

One of the features of xterm is that if you set the size to “unreadable”
you can see the outline of hundreds of lines in the screen and copy-paste
it to another screen. But you have to change in config one of the fonts to
be that “unreadable” first. I have somewhere noted how to do that.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

On 01/30/2012 01:53 PM, Carlos E. R. wrote:
> shift-pgup (or the mouse). It contains not only the commands you entered,
> but also the output of those commands

WOW, that is KEWL…i love this place, i had never heard of that before!!


DD
Read what Distro Watch writes: http://tinyurl.com/SUSEonDW

That was it, my history size was 1000 so even though I had 4000 for my scrolling their was never that much to scroll. Thanks.