TEE(1)

✨ TEE(1) ✨

okay bestie, welcome to TEE(1) from the General Commands Manual β€” she's a little legend and honestly the moment you learn her you'll never shut up about her. sit down, grab a strawberry πŸ“, let's go.


🌸 NAME 🌸

tee β€” copies standard input to each FILE, and also to standard output. yes she does both. she's an overachiever like that. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

tee [OPTION]... [FILE]...

πŸ¦‹ DESCRIPTION πŸ¦‹

Copy standard input to each FILE, and also to standard output. that's it, that's the whole job. she reads what you pipe in, drops a copy in every FILE you name, and also lets it fall through to stdout so the next program in the pipe can have some too. sharing is caring, no cap. πŸ’–


✨ OPTIONS ✨

  • -h, --help β€” Print help. she'll tell you how to use her, very demure.
  • -a, --append β€” append to the given FILEs, do not overwrite. literally "and" instead of "instead of" β€” your existing content survives. king behavior πŸ‘‘
  • -i, --ignore-interrupts β€” ignore interrupt signals (ignored on non-Unix platforms). so she just. does not flinch. 😭
  • -p β€” set write error behavior (ignored on non-Unix platforms).
  • --output-error β€” set write error behavior. pick your fighter:

Possible values:

  • warn: produce warnings for errors writing to any output
  • warn-nopipe: produce warnings for errors that are not pipe errors (ignored on non-unix platforms)
  • exit: exit on write errors to any output
  • exit-nopipe: exit on write errors to any output that are not pipe errors (equivalent to exit on non-unix platforms)
  • -V, --version β€” Print version. she'll tell you her age 🫢
  • [file]

πŸ’œ EXTRA πŸ’œ

If a FILE is -, it refers to a file named -. not stdin, bestie, an actual file whose name is one single dash. the way that trips people up every single time... thermonuclear πŸ’€


🌈 VERSION 🌈

v(uutils coreutils) 0.12.0


🌟 EXAMPLES 🌟

Copy stdin to each file, and also to stdout:

echo "example" | tee path/to/file

Append to the given files, do not overwrite:

echo "example" | tee [-a|--append] path/to/file

Print stdin to the terminal, and also pipe it into another program for further processing:

echo "example" | tee /dev/tty | xargs printf "[%s]"

Create a directory called "example", count the number of characters in "example", and write "example" to the terminal:

echo "example" | tee >(xargs mkdir) >(wc [-c|--bytes])
⚠️ heads up bestie: the examples are provided by the tldr-pages project <https://tldr.sh> under the CC BY 4.0 License. Please note that, as uutils is a work in progress, some examples might fail. not her fault, she's still growing 🌱

and that's the page, angel πŸ’– this was TEE(1), dated 2026-09-25, and we are SO obsessed. go pipe something into something else. mwah. 🫢✨

πŸ“¦ where this page comes from