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








Relevant Pages

  • Re: Why cant I scroll when in a cmd.exe window, but can with a command.exe window?
    ... Wrong buffer, you want screen buffer not command history buffer. ... Layout tab. ... If I click in the top left of the cmd.exe window and go ... my "Scroll" menu option there is grayed out as well. ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: mwheel-follow-mouse and other buffer scrolling (21.5.18)
    ... scroll wheel on the mouse. ... buffer R indeed scrolls in response to the mwheel ... I want the mouse scroll wheel to only scroll the buffer ... In a previous version of xemacs, ...
    (comp.emacs.xemacs)
  • mwheel-follow-mouse and other buffer scrolling (21.5.18)
    ... scroll wheel on the mouse. ... buffer R indeed scrolls in response to the mwheel ... I want the mouse scroll wheel to only scroll the buffer ... In a previous version of xemacs, ...
    (comp.emacs.xemacs)
  • Re: capturing 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. ... lines of scroll back using the two click method (I didn't realise the ...
    (Debian-User)
  • mdacon and scroll buffer
    ... This is the only mail list I could find that discussed mdacon. ... Mdacon appears to have no Scroll_Backward or _Forward feature (scroll ... buffer) like vgacon does (shift Page Up or shift Page Down). ...
    (Linux-Kernel)