LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Redirect output to multiple places (https://www.linuxquestions.org/questions/linux-newbie-8/redirect-output-to-multiple-places-145282/)

granny 02-12-2004 11:32 AM

Redirect output to multiple places
 
redirecting output to multiple outputs ( post #1)

I want to redirect output to multiple places, how can this be done. Something simple as...

ls /etc redirected to both a file and monitor. I know how to redirect to a file and understand std output is monitor, but how do I do both in 1 command?

ls /etc > file and then???


__________________

clinton 02-12-2004 12:31 PM

Check out the "tee" utility.

It allows you to send the output of a command to a file AND to stdout.

eg.

who | tee who.out


All times are GMT -5. The time now is 04:05 PM.