LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-23-2006, 07:44 AM   #1
DotHQ
Member
 
Registered: Mar 2006
Location: Ohio, USA
Distribution: Red Hat, Fedora, Knoppix,
Posts: 548

Rep: Reputation: 33
tee vs > or >>


tee is new to me. I saw the cmd mentioned in posts here on LQ.org.

I've always used the redirect symbols to write to a file or append to a file > or >> ( double to append).

What does tee add that you all use it instead of redirects (if anything). I realize there is normally more than one way to accomplish the same task. Is this just another occurrence of use whichever you prefer, both will get the job done.
 
Old 08-23-2006, 08:08 AM   #2
spirit receiver
Member
 
Registered: May 2006
Location: Frankfurt, Germany
Distribution: SUSE 10.2
Posts: 424

Rep: Reputation: 33
In addition to writing to a file, tee copies the data to STDOUT. So it comes in handy if one wants to create a logfile for later inspection, but also have some immediate feedback in the console.
 
Old 08-23-2006, 08:12 AM   #3
DotHQ
Member
 
Registered: Mar 2006
Location: Ohio, USA
Distribution: Red Hat, Fedora, Knoppix,
Posts: 548

Original Poster
Rep: Reputation: 33
Ahhh. Makes perfect sense. Also helps me understand why it was called Tee. Duh.
Thanks for the reply.
 
Old 08-23-2006, 01:31 PM   #4
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
tee is also useful if you want to log all the output, but only see output meeting certain criteria:
Code:
./runprogram | tee program.log | grep Error
All output is logged, and messages containing 'Error' are displayed.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Clonning data, fifo/pipe/tee problem : Resource temporarily unavailable rmarco Linux - General 2 05-05-2005 11:15 AM
Loss of scp progress indicator when piping command to tee Arodef Linux - General 1 03-08-2005 09:01 PM
Check out this tee-shirt for the linux fans confuse your friends. usernameddr General 3 01-11-2005 01:42 AM
Sweet Slackware Tee for your favorite girlie! ming0 Slackware 2 11-10-2003 12:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:17 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