b5media.com

Advertise with us

Enjoying this blog? Check out the rest of the Technology Channel Subscribe to this Feed

New Linux User

HOWTO: Use the tee Command

by Jon on April 28th, 2006

I think this is the last command in the redirection series. I’ve written about redirection and piping, which are great tools to either send command output somewhere other than normal, or to make the output of one command the input of another. What if you wanted to do two things with the output of a command such as display it on the screen and write it to a file?

Enter the tee command. Just like a tee junction in a water pipe, the tee command will allow you to send the output of a command to the screen as well as a file.

Consider the command

ls | tee ls.txt

This command will display the contents of the current directory to me on my screen, as well as write the same information to an ls.txt file in the current directory. Very handy at times.

Technorati Tags: , , ,

POSTED IN: How To

0 opinions for HOWTO: Use the tee Command

  • No one has left a comment yet. You know what this means, right? You could be first!

Have an opinion? Leave a comment:




Check Spelling
Activate Spell Check while Typing