Linux Tutorial Series

Linux Tutorial Series – 68 – The tee command

Here is the video version, if you prefer it:

The tee command is used to redirect standard output to both standard output and one or more files. (Shotts, 2019)⁠ Here is an example of its usage:

mislav@mislavovo-racunalo:~/Documents$ ls | tee ls.txt | grep test


mislav@mislavovo-racunalo:~/Documents$ cat ls.txt



AGI safety podcasti


I never used it, but it is very useful to check the output intermediary steps in long pipes.

Hope you learned something useful!


Shotts, W. (2019). The Linux Command Line, Fifth Internet Edition. Retrieved from Pages 89-90

NewsletterUpdates on interesting things I am doing

Subscribe to my newsletter to keep abreast of the interesting things I'm doing. I will send you the newsletter only when there is something interesting. This means 0% spam, 100% interesting content.

Leave a Reply

Your email address will not be published. Required fields are marked *