Tee

From NovaOrdis Knowledge Base
Revision as of 20:23, 22 July 2020 by Ovidiu (talk | contribs) (→‎Overview)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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