nohup - 没有这样的文件或目录

Rea*_*ado 4 linux centos nohup centos6

我正在尝试在我的 CentOS 6.3 x64 服务器上执行以下命令:

nohup "/usr/local/bin/php -v"
Run Code Online (Sandbox Code Playgroud)

结果是:

nohup: ignoring input and appending output to `nohup.out'
nohup: failed to run command `/usr/local/bin/php -v': No such file or directory
Run Code Online (Sandbox Code Playgroud)

这适用于 CentOS 5 没问题。知道我做错了什么吗?

Mic*_*ton 10

发生这种情况是因为您没有名为/usr/local/bin/php -v. 由于您将它放在引号中,因此整个字符串都被视为参数。

尝试删除引号。

nohup /usr/local/bin/php -v
Run Code Online (Sandbox Code Playgroud)