Reproduce previous stdout output without running previous command

Dan Nelson dnelson at allantgroup.com
Tue Jun 9 04:12:25 UTC 2009


In the last episode (Jun 08), Steven Schlansker said:
> On Jun 8, 2009, at 8:48 PM, Lord Of Hyphens wrote:
> > On Mon, Jun 8, 2009 at 10:44 PM, Daniel Underwood <djuatdelta at gmail.com 
> > >wrote:
> >>
> >> $ fdupes -r ~/directorywithlotsoflargefiles
> >>
> >> (.....lots of output, woops, should have sent to a text file!....)
> >>
> >> $ output[1] >> ~/textfile.txt
> >
> > Check the manpage for tee. That should give you a solution you're
> > looking for.
> 
> I think the intention of the original question was for the case where you
> have forgotten to set up a pipe/redirection properly before starting the
> long- running command.  Tee would work fine if you have the foresight to
> use it...

How much output are you expecting to capture?  You can configure an
arbitrary number of syscons history lines or screen scrollback lines.  I'm
sure xterm can be configured similarly, but I can't find it from a quick
skim of the manpage.  I have syscons set to 1024 lines and screen set to
10240 lines myself.  You can use vidcontrol -HP to dump syscons history if
you need to copy more than you can select with the mouse on a single page,
and screen has a whole sub-interface for interacting with its scrollback.

-- 
	Dan Nelson
	dnelson at allantgroup.com


More information about the freebsd-questions mailing list