nohup: ignoring input and appending output to ‘nohup.out
时间: 2023-11-05 22:50:00 浏览: 75
这个错误信息通常是在使用 `nohup` 命令时出现的。它表示 `nohup` 命令忽略了输入,并将输出追加到名为 `nohup.out` 的文件中。这通常是因为你在后台运行某个命令,希望它在终端关闭后继续运行。
如果你不希望看到这个错误信息,你可以将标准输入重定向到一个文件,如下所示:
```shell
nohup command > output.txt &
```
这样,命令的输出将被重定向到 `output.txt` 文件中,并且你不会再看到 `nohup: ignoring input and appending output to ‘nohup.out’` 的提示信息。
相关问题
nohup: ignoring input and appending output to 'nohup.out
nohup: ignoring input and appending output to 'nohup.out’这个错误信息表示在使用nohup命令时,输入被忽略并且输出被追加到nohup.out文件中。nohup命令用于在系统后台运行命令,即使你退出终端,程序仍然会继续运行。默认情况下,nohup命令会将输出信息重定向到一个名为nohup.out的文件中,如果当前目录下的nohup.out文件不可写,则会将输出重定向到$HOME/nohup.out文件中。
出现这个错误的原因是在运行nohup命令时没有在命令的末尾添加&符号,导致命令没有在后台运行。解决方法是在需要在后台运行的nohup命令的末尾添加&符号,这样就不会出现该错误了。
nohup: ignoring input and appending output to 'nohup.out'
当使用nohup命令运行一个程序时,出现"nohup: ignoring input and appending output to 'nohup.out'"的提示,这通常是由于输出缓冲的原因导致的。为了解决这个问题,可以在运行命令时加上"-u"选项,例如"nohup python -u Bilstm-My-Exp-Char.py --train"。这样可以禁用输出缓冲,实时地将输出写入文件,避免了出现上述提示信息。
此外,还可以解释一下这个提示中的一些相关内容。其中,"nohup"是一个命令,放在命令开头表示不挂起,即使退出终端该进程也不会停止运行。而"&"符号放在命令结尾,表示将该命令在后台运行。而"nohup.out"是一个输出文件,用于保存程序的输出内容。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [nohup: ignoring input and appending output to `nohup.out](https://blog.csdn.net/qq_39341318/article/details/116154413)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* [解决nohup重定向python输出到文件不成功的问题](https://download.csdn.net/download/weixin_38732252/13773149)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]