tee
is a widely used command in Linux systems, falling under the category of text processing tools. It performs a dual function: the command reads from the standard input and writes to standard output and files. This operation gets its name from the T-splitter in plumbing, which splits the flow into two directions, paralleling the function of the tee
command.
The basic syntax of tee
under text processing in Linux is:
command | tee file
In this construction 'command' represents the command from which tee
reads the output, and 'file' signifies the file where tee
writes the output. It's an extremely useful command for users who want to document their terminal undertakings as it enables both reviewing the result in the terminal and storing the output in the file simultaneously.