Last active
April 13, 2016 13:31
-
-
Save jsatt/6391723 to your computer and use it in GitHub Desktop.
stderr and stdout to file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# stdout to file | |
echo test > file.txt | |
# stdout append to file | |
echo test >> file.txt | |
# stderr to file | |
cmd 2> file.txt | |
# stderr to stdout | |
cmd 2>&1 | |
# stdout to std err | |
cmd 1>&2 | |
# stderr and std out to file | |
cmd &> file.txt | |
# stderr and stdout from cron | |
cmd > file.txt 2>&1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment