nohup后台运行多个程序,“X.out”文件怎么第一个可以输出,第二个就不行了?
想在后台同时跑多个Python程序,同时记录每个程序的打印输出
第一个程序启动指令:
CUDA_VISIBLE_DEVICES=0 nohup python modal10.py 1>> modal10.out 2>&1 &
把打印输出都保存到指定的文件中。
第二个程序启动指令也是类似的:
CUDA_VISIBLE_DEVICES=1 nohup python modal12.py 1>> modal12.out 2>&1 &
很奇怪,第一个可以正常保存,当启动第二个程序的时候,就提示:
nohup: ignoring input and appending output to 'nohup.out'
疑问:
1.是不是nohup后台运行并指定保存,只能保存打印输出到一个文件?
2.有没有方法,可以同时后台运行多个程序并保存打印输出的?
请教各位大神,感谢