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

Re: capturing terminal scrollback buffer?



On Fri, Sep 29, 2006 at 11:33:54PM EDT, Andrew Sackville-West wrote:

> anybody know how to capture the contents of a terminal scrollback
> buffer? i've got about 1000 lines of debug stuff from a network
> problem that I want to save, but its just sitting in the scroll back
> buffer of an aterm. argh! how do I get it out of there without
> copy/pasting it one screen at a time? 

For the future, you may want to take a look at gnu/screen.

When you are running your terminal sessions under gnu/screen and you
suddenly realize that you need to take a screen dump on the fly, all you
need to do is:

· issue the gnu/screen escape keyboard action (Ctrl-A by default) 
· :hardcopy -h dumpfile

The -h flag causes gnu/screen to write the contents of the current
display as well as the contents of the scrollback buffer to the
specified file.

The point is that it's always there ready for you to use .. you don't
need to do anything special prior to starting your debugging session &
whatnot.

Needless to say that there a tons of other great features in gnu/screen
such as advanced copying & pasting between terminal sessions and
activating/deactivating session logging on the fly .. among many others.

For a terse introduction to gnu/screen's capabilities you could read
the following article :

http://jmcpherson.org/screen.html 

For an in-depth description of gnu/screen's many talents I'm afraid that
there is no advanced tutorial that I am aware of and you will have to
study the excellent but somewhat unfriendly manual (man screen).

Thanks

cga




	







Reply to: