Unix/Linux

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • How to dump content of cmd shell buffer

    6 answers - 182 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    How can I dump the contents of my command shell buffer to a file,
    using recent bash?
    I googled up an exmple using zsh but I don't really want to use zsh
  • No.1 | | 407 bytes | |

    Harry Putnam wrote:
    How can I dump the contents of my command shell buffer to a file,
    using recent bash?

    You mean the shell's command history?

    Try 'history' or 'fc -l' (with appropriate arguments to view more than
    the default) and redirect the output.

    Janis

    I googled up an exmple using zsh but I don't really want to use zsh
  • No.2 | | 134 bytes | |

    Harry Putnam wrote:
    How can I dump the contents of my command shell buffer to a file,
    using recent bash?
    history filename
  • No.3 | | 926 bytes | |

    Wed, 02 Jan 2008 17:51:12 -0600, Harry Putnam wrote:

    However when I do want something from in there it involves a lot of
    scrolling and squinting. I've often thought how nice it would be to
    be able to grep it. So if it were dumpted to a file I could do that
    handily.

    `script' can accomplish that but in a more round about way.

    Notice: This may not work if your buffer is too big.

    got it you are using xterm.

    1. Point your mouse after the last on the xterm and do a single click.
    Don't wory if you see no effect from this click.
    2. Move you mouse to the scoll bar and scroll to the top of the window.
    3. Hold down shift and click before the first word. All the text
    should become highlighted.
    4. Now click your right mouse button and select copy.
    5. your favorite text editor, and in it right click and choose paste.

    stonerfish
  • No.4 | | 749 bytes | |

    Wed, 02 Jan 2008 15:10:25 -0600, Harry Putnam wrote:

    How can I dump the contents of my command shell buffer to a file,
    using recent bash?

    I googled up an exmple using zsh but I don't really want to use zsh

    , I looked at the xterm man page.

    The xterm mainMenu pops up when the key and pointer
    button one are pressed in a window. This menu contains items that
    apply to both the VT102 and Tektronix windows.

    Log to File (logging)
    Captures text sent to the screen in a logfile, as in the
    -l logging option.

    Seems pretty simple. Does that work?
    ps. Please forgive my multiple answers to your question. If one works
    use it. If none, then just ignore me.

    stonerfish
  • No.5 | | 261 bytes | |


    Good info, thanks posters.
    Now does anyone know if some way to get at the scrollback buffer of a
    console terminal (no X) is possible?
    (aside from `screen' I mean)
    The default TERM here in that scenario is `linux'
  • No.6 | | 253 bytes | |

    Looking back over this thread I didn't see any responses to the
    question about doing some kind of dump from a text (console) terminal.
    Anyone know if aside from the nifty screen program, there is any built
    in way to do that?

Re: How to dump content of cmd shell buffer


max 4000 letters.
Your nickname that display:
In order to stop the spam: 4 + 3 =
QUESTION ON "Unix/Linux"

EMSDN.COM