LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 02-12-2004, 11:32 AM   #1
granny
Member
 
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, 12:31 PM   #2
clinton
Member
 
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.

eg.

who | tee who.out
 
  


Reply


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 07:07 AM
redirect untar output mnauta Linux - General 3 05-01-2004 07:21 PM
Using fstab to mount a filesystem in multiple places cav Linux - General 3 02-09-2004 02:42 PM
output from cpio won't redirect to file rawii Programming 5 01-27-2004 01:49 PM
Ambiguous output redirect XFox Linux - Newbie 5 10-17-2003 07:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:15 AM.

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