# How to redirect output to a file and stdout?

In bash, calling foo would display any output from that command on the stdout. Calling foo > output would redirect any output from that command to the file specified (in this case 'output'). Is there a way to redirect output to a file *and* have it display on stdout?

## 1 Expert Answer

By:

Michael S. answered • 10/23/20

Tutor
5 (3)

USMC Cyber Warfare Vet, OSCP/OSCE Prep, Dev / Web Dev, DFIR, AI/ML

## Still looking for help? Get the right answer, fast.

Get a free answer to a quick problem.
Most questions answered within 4 hours.

#### OR

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.