You can instruct tee command to append to the file

By default tee command overwrites the file. You can instruct tee command to append to the file using the option –a as shown below.

$ ls | tee –a file
You can also write the output to multiple files as shown below.

$ ls | tee file1 file2 file3

Comments