66

I want to start my server through nohup.php but the command is not running and displays following error

nohup:ignoring input and appending output to 'nohup.out'

I am using ssh through putty, this is what i am doing

nohup php server1.php

jww
  • 97,681
  • 90
  • 411
  • 885
user3809096
  • 817
  • 1
  • 7
  • 10

2 Answers2

95

That's not an error - it's normal behavior. It just informs you that once started the in/output is removed from your console.

To avoid the message you need to start it like

nohup php server1.php </dev/null &>/dev/null &
jww
  • 97,681
  • 90
  • 411
  • 885
lpaseen
  • 1,189
  • 8
  • 8
  • 1
    Also see [Difference between 2>&-, 2>/dev/null, |&, &>/dev/null and >/dev/null 2>&1](http://unix.stackexchange.com/q/70963) on Unix and Linux stack exchange. – jww Jun 12 '16 at 01:10
0

If you want to see the output of the executed command,You need to follow this step, execute the command $tailf nohup.out

Please note : Nohup command creates a file with name nohup.out in same location where you have executed the nohup command .

Sudhir Gaurav
  • 107
  • 1
  • 4