This Blog is to share our knowledge and expertise on Linux System Administration and VMware Administration

Saturday, January 6, 2018

Tee command in Linux

NAME
       tee - read from standard input and write to standard output and files
   
Copy standard input to each FILE, and also to standard output

options:
-a, --append  - append to the given FILEs, do not overwrite
-i, --ignore-interrupts - ignore interrupt signals
Ex : 
    [root@nsk postfix]# cat main.cf | egrep -v "^#|^$" |tee -a main.cf_catoutput

Here,
Tee command will read the output of cat command & write the standard output to a specified file.

No comments:

Post a Comment