If you can see this check that

next section prev section up prev page next page

Diverting a pipeline with tee

One command that can be very useful with piping is tee, which lets you divert a copy of the data passing between commands to a file without changing how the pipeline functions. For example, write a list of users who are on the system to the screen, and also to the file 'savewho'.

% who | tee savewho
Initially if the file 'savewho' existed it would be overwritten, so if you wished to append the information to the file, you would use tee with the '-a' option.


Linux tutorials: intro1 intro2 wildcard permission pipe vi essential admin net fwall DNS diag Apache1 Apache2 MySQL1 MySQL2
Caine 2.0: Autopsy Cli PartRec Files FileRec Browser FFoxForensics Carving
Caine 2.5.1: Essentials | Basic
Useful: Quiz | Forums | Privacy Policy | Terms and Conditions
Site Links:XMLZoo ActiveSQL ProgZoo SQLZoo

Copyright @ 2004-2012 Gordon Russell. All rights reserved.