nohup: ignoring input and appending output to `nohup.out'
时间: 2024-01-14 16:21:23 浏览: 159
nohup命令是在Unix和类Unix系统中使用的一个命令,用于在后台运行程序,并且忽略输入并将输出追加到nohup.out文件中。当你在终端中运行一个命令时,如果你希望即使退出终端该进程也不会被终止,你可以使用nohup命令。
解决办法是将nohup命令放在要运行的命令之前,这样可以确保该进程不会被挂起。另外,你还可以在命令的结尾加上&符号,表示将该命令放到后台运行。
以下是一个示例:
```shell
nohup command > nohup.out &
```
这个命令将会在后台运行一个名为command的程序,并将输出追加到nohup.out文件中。即使你退出终端,进程也会继续运行。
相关问题
nohup: appending output to ‘nohup.out’ nohup: ignoring input and appending output to ‘nohup.out’
nohup命令是在Linux中用于在后台执行命令,并将输出信息重定向到nohup.out文件中的命令。当你在终端中使用nohup命令时,会出现"nohup: ignoring input and appending output to ‘nohup.out’"的错误信息,表示命令会忽略输入并将输出信息添加到nohup.out文件中。此外,你还提到了另一个错误信息"nohup: ignoring input and redirecting stderr to stdout",这表示命令会忽略输入并将标准错误输出重定向到标准输出。
所以,当你在终端看到"nohup: appending output to ‘nohup.out’ nohup: ignoring input and appending output to ‘nohup.out’"的输出时,说明nohup命令执行成功,命令将输出信息追加到nohup.out文件中并忽略输入。
nohup: ignoring input and appending output to ‘nohup.out
这个错误信息通常是在使用 `nohup` 命令时出现的。它表示 `nohup` 命令忽略了输入,并将输出追加到名为 `nohup.out` 的文件中。这通常是因为你在后台运行某个命令,希望它在终端关闭后继续运行。
如果你不希望看到这个错误信息,你可以将标准输入重定向到一个文件,如下所示:
```shell
nohup command > output.txt &
```
这样,命令的输出将被重定向到 `output.txt` 文件中,并且你不会再看到 `nohup: ignoring input and appending output to ‘nohup.out’` 的提示信息。
阅读全文
相关推荐











