nohup表示挂起, > loginfo_trainer.txt 2>&1 &表示将trainer里面的print信息自动写入当前目录的loginfo_trainer.txt文件(如果该文件不存在则会自动创建)。暂时可改的为py文件,要写入的文件名字和目录
nohup python -u trainer.py > loginfo_trainer.txt 2>&1 &
终端查看上面写入的txt文件的信息:
tail -f loginfo_trainer.txt # 动态更新查看信息
tail loginfo_trainer.txt # 查看当前信息