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
  • Select an option

  • Save davidlonjon/2ecf3a10d6c2a5209a1023f95bc9a91b to your computer and use it in GitHub Desktop.

Select an option

Save davidlonjon/2ecf3a10d6c2a5209a1023f95bc9a91b to your computer and use it in GitHub Desktop.

Revisions

  1. @umidjons umidjons created this gist Jan 14, 2014.
    5 changes: 5 additions & 0 deletions nohup-output-to-file.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    # 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