tee [options] file...Arguments explained
- file is where to write a copy.
- -a appends instead of overwriting.
Common examples
dmesg | tee kernel.log | lessWrites dmesg to kernel.log and pages it.
echo 'alias ll="ls -lah"' | tee -a ~/.bashrcAppends a line while also printing it.
| Field | Details |
|---|---|
| Command | tee |
| Category | Text Processing |
| Primary use | Writes input to both a file and standard output. |
| Syntax | tee [options] file... |