O'Reilly logo

A Practical Guide to Red Hat® Linux® 8 by Mark G. Sobell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

tee

Copies standard input to standard output and one or more files

tee [options] file-list

The tee utility copies standard input to standard output and to one or more files you specify on the command line.

Arguments

The file-list contains the pathnames of files that receive output from tee.

Options

Without any options, tee overwrites the output files if they exist and responds to interrupts. If a file in file-list does not exist, tee creates it.

--append

-a Appends output to existing files rather than overwrites them.

--ignore-interrupts

-i Causes tee not to respond to interrupts.

Example

In the following example, a pipe sends the output from make to tee, which copies it to standard output and the file accounts.out. The copy that goes to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required