By default, tee truncates existing files to zero before writing to them.
tee takes the following options:
Some programs may allow you to use the log file as input:
program < input.log
Copy and append output from a program to the file
program | tee -a output.log
Create temporary files at each stage in a pipeline:
grep ABC foo | tee ABC.grep | sort | tee ABC.sort | more
Send tee output to the terminal screen:
grep ABC foo | tee /dev/tty | sort -u > final.file
ISO/IEC DIS 99452:1992, Information technology Portable Operating System Interface (POSIX) Part 2: Shell and Utilities (IEEE Std 1003.21992);
AT&T SVID Issue 2;
X/Open CAE Specification, Commands and Utilities, Issue 4, 1992.