Last active
August 29, 2015 14:15
-
-
Save pokka/03249f851f9f60448af9 to your computer and use it in GitHub Desktop.
Run linux cmd with a target output and run in background
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
cmd > log 2>&1 & | |
#Redirects STDOUT to log and than replaces STDERR with the redirected STDOUT. | |
cmd 2>&1 > log & | |
#Replaces STDERR with STDOUT and then redirects the original STDOUT to log. | |
cmd 2>&1 > /dev/null & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment