4

I'm trying to execute the following command on my CentOS 6.3 x64 server:

nohup "/usr/local/bin/php -v"

The result is:

nohup: ignoring input and appending output to `nohup.out'
nohup: failed to run command `/usr/local/bin/php -v': No such file or directory

This works on CentOS 5 no problem. Any idea what I'm doing wrong?

Reado
  • 692
  • 2
  • 9
  • 24

1 Answers1

10

That's happening because you don't have a file named /usr/local/bin/php -v. Since you put it in quotes, the entire string is being treated as the argument.

Try removing the quotes.

nohup /usr/local/bin/php -v
Michael Hampton
  • 237,123
  • 42
  • 477
  • 940
  • yes in my case it was not the usual cron/path but transferring a command from daemon (which had the quotes around multiple args), and the nohup command, which did not need that – Paul Jul 31 '18 at 16:15