# tee

*noun*

say it: **“TEE”** **/ti/**

A command that saves what comes through a pipe into a file and also passes it on, so you can keep it and see it at once.

## What does `tee` do?

`tee` is a T-shaped joint for a pipeline: it writes the lines that reach it into a file **and** passes them on to the screen or the next command. `tee -a` adds to the end of the file instead of replacing it.

```bash
cut -d, -f5 orders.csv | tail -n +2 | sort | uniq -c | sort -rn | tee city-report.txt
```

## In a sentence

- “Maya added **tee** city-report.txt to the end of the pipeline, so the ranking was saved and still on her screen.”
- “**tee** -a added the item counts to the same report instead of replacing it.”

Level: Apprentice · [More Unix terms at this level](https://www.ask-codey.com/glossary?category=unix&level=2)

Updated: November 10, 2026

Source: https://www.ask-codey.com/glossary/tee
