tee is a command line utility that reads the standard input and writes to the standard output as well as a file specified as an argument. Use this tag for questions about the tee command.

tee is a standard unility that read from standard input and write to standard output and files.


Taking simple file as this:

$ cat file

These commands will count the rows in the file and write it in file_tee plus the name of the file. If file_tee is not empty the contents would be truncated.

$ wc -l file | tee file_tee
3 file

Further reading

history | excerpt history