Linux screen如何创建后自动执行命令

这问题,不能问某娘,你得问谷哥。
直接上答案:

screen -dmS test bash -c 'python /test.py'

上述指令就是创建test后在其中执行python的脚本,其他的自己举一反三吧。

参考资料:
http://aperiodic.net/screen/quick_reference
http://serverfault.com/questions/578608/start-unix-screen-run-command-detach


未经允许不得转载:阿藏博客 » Linux screen如何创建后自动执行命令

赞 (0) 打赏