bash log to file

علی ذوالفقار
1399/10/06 17:40:29 (205)
#send stderr to stdout
echo test 2>&1
#send stdout to msg.txt file and stderr to err.txt
command 1>>msg.txt 2>>err.txt
#send stderr to stdout and send all to result.txt file
command &>> result.txt
command 2>&1&>> result.txt
Back