Created
September 23, 2017 18:51
-
-
Save vinsim24/3a0887c08d4c6bd74d20633538bfff2f to your computer and use it in GitHub Desktop.
Nohup command usage
This file contains hidden or 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
nohup node server.js > /dev/null 2>&1 & | |
1. nohup means: Do not terminate this process even when the stty is cut off. | |
2. > /dev/null means: stdout goes to /dev/null (which is a dummy device that does not record any output). | |
3. 2>&1 means: stderr also goes to the stdout (which is already redirected to /dev/null). You may replace &1 with a file path to keep a log of errors, e.g.: 2>/tmp/myLog | |
4. & at the end means: run this command as a background task. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment