On Mon, Jun 8, 2009 at 10:44 PM, Daniel Underwood <djuatde...@gmail.com>wrote:

> OK, this is perhaps a weird question, capable of being very confusing.
>  So let's take a "for instance".
>
> Suppose I run something like the Linux command "fdupes" on a directory
> with many large files.  This operation will take considerable time to
> complete.  When it completes, a lot of output is send to stdout
> (displayed on the terminal).
>
> Further suppose that after running the command, I decide I want to
> save the output to a text file, so I can analyze the results outside
> of the terminal.  What can I do? Well, I can do a traditional
> "copy-and-paste", or I could re-enter the previous command and send it
> to a text file (which I ought to have done in the first place).
>
> But is there another option?  Is there some variable (such as,
> hypothetically, $output[n], where n=some integer index) that I could
> use to store the results in a text file?  Such an option might look
> like the following:
>
> $ fdupes -r ~/directorywithlotsoflargefiles
>
> (.....lots of output, woops, should have sent to a text file!....)
>
> $ output[1] >> ~/textfile.txt
>
> Hopefully this has made (some) sense.
> <freebsd-questions@freebsd.org>


Check the manpage for tee. That should give you a solution you're looking
for.

--Joseph Lenox

-- 
"Nothing unreal exists." - Kiri-kin-tha's First Law of Metaphysics.
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to