[Cialug] Bash or Terminal Output

kristau kristau at gmail.com
Wed Jul 25 16:50:16 UTC 2018


Scroll back buffer is your best bet after the fact. If you suspect you
may need the output ahead of time, use tee. For example:

  nmap -sS -F some.target.host.com | tee nmap.out

That will display the output to the standard output, but also dump it
into the file nmap.out. I try to use this any time I have output that
may scroll off the screen.

Always piping through less would also work. You can then use the 's
filename' command to write out to a file, should the need arise.

On Wed, Jul 25, 2018 at 11:34 AM, Adam Shannon <adamkshannon at gmail.com> wrote:
> +1 for GNU screen.
>
> screen -L <command>
>
> Will log to a file (screenlog.0, .1, etc) in the current dir.
>
> On Wed, Jul 25, 2018 at 11:29 AM, David Michael <1.david.michael at gmail.com>
> wrote:
>
>> If you wanted to get real crazy you could log the shell history to a
>> location better than what it does by default. Then you could have a logging
>> solution read the file and log it somewhere more permanent.
>>
>> Random Example I found:
>> https://www.duanewaddle.com/splunking-bash-history/
>>
>> On Wed, Jul 25, 2018 at 9:40 AM Matt Millard <millard.matt at gmail.com>
>> wrote:
>>
>> > I use GNU screen for any remote sessions with an appropriately large
>> > buffer set in it. Others may prefer tmux or similar utility.
>> >
>> >
>> > ________________________________
>> > From: 32471561200n behalf of
>> > Sent: Wednesday, July 25, 2018 9:03 AM
>> > To: Central Iowa Linux Users Group
>> > Subject: Re: [Cialug] Bash or Terminal Output
>> >
>> > All you can do is hope the scroll back buffer was large enough. I use
>> putty
>> > and have changed my default to 20,000 lines.
>> >
>> > On Wed, Jul 25, 2018, 8:59 AM Todd Walton <tdwalton at gmail.com> wrote:
>> >
>> > > When I run a command in Bash and it sends stdout to the screen, is that
>> > > stdout retrievable from anywhere? If I ran a command and then after the
>> > > fact decided that I wanted to capture some of the output, where could I
>> > get
>> > > it without re-running the command?
>> > >
>> > > --
>> > > Todd
>> > > _______________________________________________
>> > > Cialug mailing list
>> > > Cialug at cialug.org
>> > > http://cialug.org/mailman/listinfo/cialug
>> > >
>> > _______________________________________________
>> > Cialug mailing list
>> > Cialug at cialug.org
>> > http://cialug.org/mailman/listinfo/cialug
>> > _______________________________________________
>> > Cialug mailing list
>> > Cialug at cialug.org
>> > http://cialug.org/mailman/listinfo/cialug
>> >
>> _______________________________________________
>> Cialug mailing list
>> Cialug at cialug.org
>> http://cialug.org/mailman/listinfo/cialug
>>
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> http://cialug.org/mailman/listinfo/cialug



-- 
Tired programmer
Coding late into the night
The core dump follows


More information about the Cialug mailing list