tee is a command that reads from standard input and writes to standard output and to a file, so that the user can see output from a command at the same time as saving it.
The tee command allows the user to capture the output from a command to a file without preventing it from appearing in the terminal window, unlike > redirection. This provides, for example, a way of checking what is being written to a file, or of logging output for later examination.
Example:
$ echo "tee is a very useful command" | tee tee-love
tee is a very useful command
$ cat tee-love
tee is a very useful command
tee has a useful option -a to append to a file (by default, it overwrites an existing file with the new contents, or creates the file if it does not exist)
$ echo "<3" | tee -a tee-love
<3
$ cat tee-love
tee is a very useful command
<3
