Jun 162014
 

Tee

The command “tee” it’s one of the basic commands that you should find in any system, yet it’s not so popular or use, this command reads standard input and writes it to both standard output and one or more files, effectively duplicating its input. It is primarily used in conjunction with pipes and filters. The command is named after the T-splitter used in plumbing.

In short if you want to redirect the STDOUT of any command as well as printing it to the screen, tee is the right tool to use, let’s see some practical use of this command.
Continue reading »

Flattr this!

Sep 252011
 

Unix based operating systems like Linux offer a unique approach to join two commands on the terminal, with it you can take the output of the first command and use it as input of the second command, this is the concept of pipe or | . Pipes allow two separate process to communicate with each other also if they were not created to do it, so this open an infinite series of opportunity.

A basic example is:

ls -l | grep rwxrwxrwx

This command will print the list of all the files in the local directory that have permission rwxrwxrwx (or that have rwxrwxrwx in their name).

Continue reading »

Flattr this!