首页后端开发其他后端知识解决"ignoring input and appending output to ‘nohup.out’"问题

解决"ignoring input and appending output to ‘nohup.out’"问题

时间2023-04-19 23:54:01发布访客分类其他后端知识浏览901
导读:在编译执行python文件的时候,采用nohup进行后台自动运行,但是在执行文件的时候出现"nohup: ignoring input and appending output to ‘nohup.out’"的错误提示。搜索文章之后将 解决...

在编译执行python文件的时候,采用nohup进行后台自动运行,但是在执行文件的时候出现"nohup: ignoring input and appending output to ‘nohup.out’"的错误提示。搜索文章之后将 解决办法记录下来。直接抛弃概念性的文件,直接将如何解决记录。

chmod +x hello.py

nohup python hello.py > /dev/null 2> & 1 &

这样将.py文件更换成我们自己的就可以了。这里仅仅是后台运行,但是我们如果希望确保重启和服务器变动之后也保持运行,则需要添加到开机启动项中(Debian/Ubuntu系统设置开机启动项的方法)。

声明:本文内容由网友自发贡献,本站不承担相应法律责任。对本内容有异议或投诉,请联系2913721942#qq.com核实处理,我们将尽快回复您,谢谢合作!

nohup.out

若转载请注明出处: 解决"ignoring input and appending output to ‘nohup.out’"问题
本文地址: https://pptw.com/jishu/3924.html
如何实现Typecho首页不显示某个分类文章 如何调用Typecho程序指定分类的文章方法

游客 回复需填写必要信息