Skip to content

Instantly share code, notes, and snippets.

@davidlonjon
Forked from umidjons/nohup-output-to-file.sh
Created September 26, 2016 05:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidlonjon/2ecf3a10d6c2a5209a1023f95bc9a91b to your computer and use it in GitHub Desktop.
Save davidlonjon/2ecf3a10d6c2a5209a1023f95bc9a91b to your computer and use it in GitHub Desktop.
Redirect nohup output to a file
# redirect output and errors into file output.log:
nohup some_command > output.log 2>&1&
# abbreviated syntax for bash version >= ver.4:
nohup some_command &> output.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment