Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-12-2004, 12:32 PM   #1
Registered: Nov 2002
Distribution: RH
Posts: 141

Rep: Reputation: 15
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???

Old 02-12-2004, 01:31 PM   #2
Registered: Oct 2003
Location: Vancouver
Distribution: RH Enterprise AS 3
Posts: 47

Rep: Reputation: 15
Check out the "tee" utility.

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


who | tee who.out


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to redirect the output of a terminal? cpukiller Linux - Networking 5 11-10-2004 08:07 AM
redirect untar output mnauta Linux - General 3 05-01-2004 08:21 PM
Using fstab to mount a filesystem in multiple places cav Linux - General 3 02-09-2004 03:42 PM
output from cpio won't redirect to file rawii Programming 5 01-27-2004 02:49 PM
Ambiguous output redirect XFox Linux - Newbie 5 10-17-2003 08:29 PM

All times are GMT -5. The time now is 06:26 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration