You might have wanted to mention the magic of "2>&1 " before piping because without this it only pipes the STDOUT but with this it pipes STDOUT and STDERR. Considering the most common use-cases, this is probably a must-know.
@MFM888327 ай бұрын
Perfect explanation of "tee" to a tee!
@kylabutler98514 жыл бұрын
Thank you so much!!!!! You explained this better to me than ANY other person or course! Thank you!!!!
@sysghost7 жыл бұрын
Another tip on this command: Good to redirect the output to a process run as another user. Simple example when logged in as a normal user: This will not work: sudo echo "myawesomecomputername" > /etc/hostname This do work: echo "myawesomecomputername" | sudo tee /etc/hostname Sure there are many other ways to to this particular example. The point being is that one sometimes need to run something as a user, but need to process the output as another user. tee will help there.
@tutoriaLinux7 жыл бұрын
This is a great example of real-life usage -- thanks!
@ravivemuri1545 жыл бұрын
Thank you!!
@DanielSMatthews7 жыл бұрын
alias tea='tee -a' Unless you have the test editor "tea" installed. :-)
@OddRandomThoughts7 жыл бұрын
cool, this would be great for something like sudo watch tail -f /var/log/syslog | tee -a bla.txt if you wanted to capture just the output of a specific configuration change or problem for reviewing later. Thanks for the great tip!
@JustinC9057 жыл бұрын
Neat little video. Now I will use tee. Thanks. Man, all these videos are super useful, and great quality. Especially love the series on Python 3. Thanks a lot.
@gaithalbadarin67747 жыл бұрын
nice, Unix/ Linux every day something new to learn.
@fifothebot7 жыл бұрын
Another nice use case is when you want to log an interactive command, so something where you get asked stuff once in a while (username or password for example). Even though the script command might be more useful in that scenario.
@ryanhebron42877 жыл бұрын
I had no idea tee existed thanks
@Classically.Inclined2 жыл бұрын
Great video! Thanks!
@AmitKumar-pl4qm6 ай бұрын
Nice way to explain
@OddBallTrails6 жыл бұрын
Your videos deserve my subscription, thanks.
@SamSharifian7 жыл бұрын
Hey, thanks for the cool tutorial... but can you also explain what are those green/red arrows on the left side of your prompt?! What terminal are you using? Isn't it GNOME's "terminator" by any chance?
@tutoriaLinux7 жыл бұрын
That's the default prompt for zsh (the Z shell). I'm using 'oh-my-zsh' to customize it. The terminal emulator is Gnome 3 term. Have fun :-D
@QuestionTheTruth3 жыл бұрын
So, I have a raspberry pi, and on it it's only been command lines running, I now noticed that I have a full log somewhere with every commands used since like 2 years back, but I can only see one at a time, I want to be able to ... download a file which i can skim through to find what commands I used back then, because I don't remember, I have my bots on it, and that's it basically. "/
@Steeldragon927 жыл бұрын
Thanks for a video, though it looks more like one of the "Hello world" one... Would love to see the use of this command along with some python/bash script, to actually show it's usefulness and convince me to use it. We need more high level stuff! :) Still thanks ;-)
@tutoriaLinux7 жыл бұрын
Yep, I hear ya. There are some more advanced Linux videos coming as soon as I'm done with the Python basics course. RHCSA/RHCE is next!
@casperes09127 жыл бұрын
Thanks for the educational material, man. It's great!
@xBIadex7 жыл бұрын
Super helpful, thanks
@zapy4225 жыл бұрын
An interesting feature would also be to save the command itself.
@danydanger2 жыл бұрын
Try using script command, use like this --> script /home/user/myWork.out -----> now whatever u do will be logged in this file, press ctrl+c to exit from this script output and come back to your Shell
@baleia7 жыл бұрын
I`m a newbie in Linux, but for this purpose of writing the output to a file I could just use nohup right!?
@tutoriaLinux7 жыл бұрын
If you only wanted to write to a file, then nohup or just redirecting the output with '>>' would be fine. tee is really useful when you want to duplicate/split your output, logging it and also piping it into further commands to drill down into the data. You could, for example, log the raw output of the first command, and then also save an organized report of that same data that's been run through a little CLI pipeline. Once you know 'tee' you'll find it coming in handy quite a bit.
@jaredmeit61277 жыл бұрын
super useful. thanks!
@CarlosMendez-uo5xm7 жыл бұрын
Very cool, thanks
@micmac81713 жыл бұрын
Thus I can write to multiple files like: date | tee f1 | tee f2 | tee f3 > f4
@modern__ninja7 жыл бұрын
Awesome! more video like this please :3
@MartinOscarPapa7 жыл бұрын
i like it . thanks
@SadahamRanawake7 жыл бұрын
thanks dude
@AnonymousAccount5147 жыл бұрын
ooph....popping those P's almost broke my speakers....do you have a governor on your mic
@tutoriaLinux7 жыл бұрын
Sorry 'bout that -- experimenting with a new mic.
@amitsinghrawat_asr6 жыл бұрын
Thanks..🙂
@coldbluemptybottle4 жыл бұрын
f*cking WINDOWS!
@Gregorydaerr19715 жыл бұрын
Huh huh ... he said log.log......Hugh uhhhh Ew.
@danydanger2 жыл бұрын
For whole shell output to a file Try using script command, use like this --> script /home/user/myWork.out -----> now whatever u do will be logged in this file, press "ctrl+c" to exit from this script output and come back to your Shell !!!!
@JohnnieWalkerGreen2 жыл бұрын
how to tee 'tail -f /var/log/kern.log | grep XXX' ?