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

КОМЕНТАРІ • 28

  • @gopikrishnanr3768
    @gopikrishnanr3768 3 роки тому +1

    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.

  • @pepitoos
    @pepitoos 3 роки тому

    Finally, after looking on the internet for about 1 hour I found the perfect answer about STDIN, STDERR, and STDOUT.

  • @ElliyahuRosha
    @ElliyahuRosha 4 роки тому +1

    Wow, that was at least 2 levels above
    the previous best explanation of I/O redirection

  • @ksprashutv
    @ksprashutv 4 роки тому +1

    Beautifully explained in a clear and progressive manner. Thanks a lot for this.

  • @LessonadeStudy
    @LessonadeStudy 2 роки тому +1

    Awesome explanation. Thank you so much for making this video. It is really helpful.

  • @ogreeni
    @ogreeni 2 роки тому +1

    Fantastic explanation. You earned a sub!

  • @spaceiswater6539
    @spaceiswater6539 5 років тому +5

    Totally fantastic thank you so much for this.

  • @Pop3455
    @Pop3455 5 років тому +3

    Well, I learned something. Thank you, I have always wondered what &2>1 and things similar means in bash scripts.

  • @mohammedhasanagha4650
    @mohammedhasanagha4650 Рік тому

    amazing explanation. It is sad that you stopped posting on youtube

  • @jag1951
    @jag1951 4 роки тому +4

    head is spinning watching this

  • @StraitBizness
    @StraitBizness 3 роки тому

    Thank you for the clear explaination.

  • @mahijmomin7306
    @mahijmomin7306 4 роки тому

    Awesome explanation. Thanks for making it easy to understand.

  • @wisamkhalid5663
    @wisamkhalid5663 4 роки тому

    very usefull. ...really precise and easy to understand..thanks..u r awesome..

  • @tanviagarwal4434
    @tanviagarwal4434 3 роки тому

    Thanks, It was helpful.

  • @user-kg3lb1mt4y
    @user-kg3lb1mt4y 9 місяців тому

    thank u so much for this video

  • @andrestrada4
    @andrestrada4 3 роки тому

    Thank you so much. It was really helpful :D

  • @dontmindme8709
    @dontmindme8709 5 років тому

    Thank you! This was very helpful.

  • @MrShaileshpal
    @MrShaileshpal 5 років тому

    Great work

  • @dhanushsivajaya1356
    @dhanushsivajaya1356 3 роки тому

    Thankyou sir

  • @greob
    @greob 5 років тому +6

    Redirect some more sound of your voice to my left ear please.

  • @Shwashank
    @Shwashank 5 років тому

    Video seems to be corrupted at ~ T+30seconds

  • @luendersilvamarquezini286
    @luendersilvamarquezini286 2 роки тому

    no video shows how to solve the stdin error in any command even for beginners no one shows how to solve the command

  • @webdeveloper7994
    @webdeveloper7994 5 років тому

    👌

  • @igivememes9226
    @igivememes9226 2 роки тому

    wow I still have no idea what I'm doing 😃

  • @jollygoodshow1587
    @jollygoodshow1587 3 роки тому +2

    TOO FAST