Bash redirect sdtout and stderr
In this article we describe how you can redirect output in the Bash in Linux sdtout and stderr. It is also commonly referred to as Bash Redirection or Output Redirection.
stdout -> Redirection File
programm > file.txt
stderr -> Redirection File
programm 2> file.txt
stdout AND stderr -> Redirection File
programm &> file.txt
stdout -> stderr
stderr -> stdout
Author: Werner Fischer
Werner Fischer, working in the Web Operations & Knowledge Transfer team at Thomas-Krenn, completed his studies of Computer and Media Security at FH Hagenberg in Austria. He is a regular speaker at many conferences like LinuxTag, OSMC, OSDC, LinuxCon, and author for various IT magazines. In his spare time he enjoys playing the piano and training for a good result at the annual Linz marathon relay.