bash redirect stdout stderr to file code example Example: linux redirect everything (stdout and stderr) to file foo > allout.txt 2>&1