Stderr Stdout and Stdin - How to Redirect them - Commands for Linux
Вставка
- Опубліковано 18 вер 2024
- Stderr Stdout and Stdin - How to Redirect them - Commands for Linux
This video will show you how to redirect standard input, standard output and standard error also known as the standard streams. Throughout this video we go over redirecting standard error( stderr ) and standard output ( stdout ) to files so that you can have both outputting to the same file or separate files. We also cover redirecting stdin.
There are many reasons to redirect stdout and stderr. An example of this would be
you are dealing with a program or utility that spams a large amount of output to the screen but you are only interested in error to diagnose some problem. You could trawl through the output searching for errors, but this is time consuming it
would be a much better idea for you to just redirect stdout to /dev/null and you will be left with only error displayed within your terminal.
Redirection of these three standard file descriptors is common to see in bash scripts along with using exec to make your own file descriptors and is just another handy tool to have at your disposal.
Just remember if you are redirecting stdout, stderr or both to a file and you want to keep the output from previous redirection make sure you append with double greater than signs as this will stop you from clobbering data that was previously written to your file.
Subscribe: www.youtube.co...
Blog: www.linuxleech.com
Twitter: / linuxleech
Facebook: / linuxleech
After hours of searching I finally found a video that explains the concepts clearly. This is how tutorials should be made.
During my initial days of Linux experimentation using my live Ubuntu USB, I learnt how to expand the file system space from the default FAT32 limit using your video back in 2014. Kudos to this channel.
Finally, after looking on the internet for about 1 hour I found the perfect answer about STDIN, STDERR, and STDOUT.
Wow, that was at least 2 levels above
the previous best explanation of I/O redirection
Beautifully explained in a clear and progressive manner. Thanks a lot for this.
Awesome explanation. Thank you so much for making this video. It is really helpful.
You're very welcome!
Fantastic explanation. You earned a sub!
Totally fantastic thank you so much for this.
Well, I learned something. Thank you, I have always wondered what &2>1 and things similar means in bash scripts.
amazing explanation. It is sad that you stopped posting on youtube
head is spinning watching this
Thank you for the clear explaination.
Awesome explanation. Thanks for making it easy to understand.
You are welcome!
very usefull. ...really precise and easy to understand..thanks..u r awesome..
Thanks, It was helpful.
thank u so much for this video
Thank you so much. It was really helpful :D
Thank you! This was very helpful.
Great work
Thankyou sir
Redirect some more sound of your voice to my left ear please.
Video seems to be corrupted at ~ T+30seconds
no video shows how to solve the stdin error in any command even for beginners no one shows how to solve the command
👌
wow I still have no idea what I'm doing 😃
TOO FAST