A Few Examples of Using the Tee Command

preview_player
Показать описание
Tee lets you read from stdin and write to both stdout and a file at the same time.

Hit the subscribe button to receive more videos like this!

REFERENCE LINKS
---------------------------------------------------

COURSES
---------------------------------------------------
Courses I've created that focus on web dev and deployment topics.

THE TOOLS I USE / GEAR
---------------------------------------------------

FOLLOW ME ELSEWHERE
---------------------------------------------------

TIMESTAMPS
---------------------------------------------------
0:00 -- Intro
0:06 -- How tee works
0:24 -- Echoing something to stdout and a file
1:03 -- Appending to a file
1:42 -- Writing to multiple files at once
2:17 -- Using sudo tee to redirect output to a file owned by root
4:08 -- Writing to stdout and the clipboard
Рекомендации по теме
Комментарии
Автор

Nice, didn't know this command existed! I'll add this to my future scripts where I need to log steps, saves me a few lines of code and just pipe to tee instead. Thanks for taking time, looking forward to some more!

cipher_ali
Автор

Man this is amazing!! I love your videos

reginaeffingeorge
Автор

Very well explained and also very interesting. I'd have needed to watch this 10 years ago, it would have changed a few things in my life.

sandro-here
Автор

i used 'echo mem | sudo tee /sys/power/state' to put my computer into sleep while also testing some things that seem to break it. I couldnt figure out whats going wrong, but the gist is that my computer takes like multiple hours to finally shut off and waking up just displays a garbled mess. I havent waited multiple hours to see if it would fix itself because i want to use my computer.

wChris_
join shbcf.ru