nohup:ignoring input and appen
时间: 2023-05-02 19:00:33 浏览: 81
这是一个来自Linux系统的警告信息,意思是“nohup正在忽略输入和附加”。nohup是一个命令,在Linux系统中用于在后台运行长时间的进程,例如运行一个脚本或一个程序等。这个警告信息表示nohup在运行时没有收到任何输入,并且没有附加到任何输出中。这通常是正常的,因为nohup是在后台运行的,不需要人工交互。
相关问题
nohup: ignoring input
nohup: ignoring input是nohup命令的一种提示信息,意味着该命令忽略了输入。
当在Linux中使用nohup命令时,如果不指定输入,nohup命令会自动忽略输入,并将输出记录到nohup.out文件中。
在默认情况下,nohup命令会在当前目录下生成一个名为nohup.out的文件来存储输出信息。如果当前目录的nohup.out文件不可写,则输出会被重定向到$HOME/nohup.out文件中。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [nohup: ignoring input and appending output to ‘nohup.out](https://blog.csdn.net/qq_51066068/article/details/124542326)[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* *3* [nohup 命令之 nohup: ignoring input and appending output to ‘nohup.out’](https://blog.csdn.net/qq_45956730/article/details/124712224)[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 ]
nohup: ignoring input and redirecting stderr to stdout
nohup命令用于在后台运行程序,并将标准输出和标准错误输出重定向到指定文件。当启动服务时出现"nohup: ignoring input and redirecting stderr to stdout"的错误提示时,表示输入被忽略,并且标准错误输出被重定向到标准输出。
这个错误提示通常是由于命令行中使用了重定向符号">"和"2>",导致输入被忽略。要解决这个问题,可以尝试以下方法:
1. 检查命令行中的重定向符号是否正确使用,并确保没有多余的空格或特殊字符。
2. 确保命令行中的输入正确,并且没有被重定向到其他文件。
3. 如果需要将标准错误输出重定向到文件,可以使用以下命令:
```shell
nohup command > output.log 2>&1 &
```
这样可以将标准输出和标准错误输出都重定向到output.log文件中。
4. 如果需要实时查看输出,可以使用"-u"参数来禁用Python的输出缓冲,例如:
```shell
nohup python -u script.py > output.log 2>&1 &
```
这样可以实时将输出写入output.log文件中。