Tee: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Created page with "=Internal= * Linux =Overview= something | tee ~/tmp/master.log")
 
 
(One intermediate revision by the same user not shown)
Line 5: Line 5:
=Overview=
=Overview=


something | tee ~/tmp/master.log
The tee utility copies standard input to standard output, making a copy in zero or more files.
 
<syntaxhighlight lang='bash'>
something | tee ~/tmp/master.log
</syntaxhighlight>
 
To capture both stdout and stderr in the same file and send them both to stdout:
 
<syntaxhighlight lang='bash'>
something 2>&1 | tee ~/tmp/master.log
</syntaxhighlight>

Latest revision as of 20:23, 22 July 2020

Internal

Overview

The tee utility copies standard input to standard output, making a copy in zero or more files.

something | tee ~/tmp/master.log

To capture both stdout and stderr in the same file and send them both to stdout:

something 2>&1 | tee ~/tmp/master.log