---
name: "tee"
section: "1"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["linux", "freebsd", "openbsd", "macos"]
url: "https://new.carta.tech/tee"
---

# tee(1)

duplicate standard input

## NAME

**tee** – duplicate standard input

## SYNOPSIS

**tee** \[**-ai**\] \[*file ...*\]

## DESCRIPTION

The **tee** utility copies standard input to standard output, making a copy in zero or more files. The output is unbuffered.

The following options are available:

- **-a**

  Append the output to the files rather than overwriting them.

- **-i**

  Ignore the SIGINT signal.

The following operands are available:

- *file*

  A pathname of an output *file*.

The **tee** utility takes the default action for all signals, except in the event of the **-i** option.

This implementation of the **tee** utility may also write to [unix(4)](/unix/4.md) sockets.

## EXIT STATUS

The **tee** utility exits 0 on success, and \>0 if an error occurs.

## EXAMPLES

Send the echoed message both to stdout and to the *greetings.txt* file:

```
$ echo "Hello" | tee greetings.txt
Hello
```

## STANDARDS

The **tee** utility is expected to be IEEE Std 1003.2 (“POSIX.2”) compatible.

## HISTORY

The **tee** command first appeared in Version 7 AT&T UNIX.
