$ tee
Read from standard input and write to standard output and files
DOCUMENTEDSearch & textUbuntu 24.04 LTS baseline
Synopsis
tee [OPTION]... [FILE]...
What it does
- `tee` copies standard input to standard output and to each specified file.
- `-a` appends to files rather than truncating them.
Examples
Display and save command output
ip addr | tee network.txtAppend instead of overwrite
command | tee -a output.logImportant details
These examples are intentionally conservative. Command behavior can still depend on filesystem state, permissions, locale, shell, installed package version, and other system configuration.
For exact option semantics, the linked authoritative documentation is the source of truth.