On Thu, 20 Apr 2000, Minh Van wrote:

> 
> i don't know how to use tee properly. 
> 
> some trials with 'tcpdump -i ppp0 > /dev/stdin | tee -a /tcpdump.log'
> doesn't pipe tcpdump output and log the output to tcpdump.log, even if i
> use '... /dev/stdout | tee'.

Think about the above command for a moment....

You're asking it to redirect standard output to a file AND redirect
standard output to a program. The first one wins.

You're also asking it to redirect standard output to /dev/stdin which
is a little silly.

What you want is this

    tcpdump -i ppp0 | tee -a /tcpdump.log

This will show you the output on the screen AND save it in the file
/tcpdump.log

Regards
Peter
----------
Peter Samuel                                [EMAIL PROTECTED]
Technical Consultant                        or at present:
eServ. Pty Ltd                              [EMAIL PROTECTED]
Phone: +61 2 9206 3410                      Fax: +61 2 9281 1301

"If you kill all your unhappy customers, you'll only have happy ones left"

--
SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
To unsubscribe send email to [EMAIL PROTECTED] with
unsubscribe in the text

Reply via email to