I'm viewing a log file with tail -f using GNOME Terminal.  The log has a lot of input constantly coming into it, and what I find happens is that I scroll up to a previous section, and I'm reading it, and then the screen goes black, or gets replaced with text which is further down the file. I don't know if this is the problem, but it's as if tail can only hold so many lines in memory, and when a certain number come in after the ones I'm reading, it deletes the ones I'm reading.The number of subsequent lines which need to come in to make this happen isn't too huge - about 600 (~55,000 bytes) lines in an experiment I just did.  I'd like to increase this to about 20,000 lines (or 1,000,000 bytes, say, if it's counted in bytes).  Can anyone tell me how to do this?  thanksPS - someone reading this might be tempted to say this isn't what tail -f is for, it's just for reading the end of files.  I like to have the best of both worlds - to press Enter to get to the end of the file and see what's happening now, but also to be able to scroll up and see what happened previously.
tail -f in GNOME Terminal - scrolling to previous lines breaks if there's been lots of subsequent output
gnome terminal;tail
GNOME-Terminal's scrollback setting is under Edit->Preferences->Profiles->Edit->Scrolling. The default value appears to be 8,192 lines on my install, but you can set it to what you want or disable the limit entirely.You can also use a pager such as less for the same purpose:tail -f file | lessNote that storing unlimited history in memory may end up taking a fairly large chunk of memory in long-running tasks. Using a pager will allow much of the buffer to be cleared when you exit the pager, while in the terminal it lasts as long as your terminal session.You may find this past answer about scrollback buffers helpful to understanding what's going on.