1、nohup XXX > XXX.txt 2>&1 &:后台运行程序
2、python XXX.py > XXX.txt
3、python XXX.py | tee XXX.txt
https://blog.youkuaiyun.com/zsytoyota/article/details/84871719
https://blog.youkuaiyun.com/qq_15505637/article/details/81270561
4、tail -f XXX.txt
5、su/exit
https://blog.youkuaiyun.com/lileihappy/article/details/79828709
6、print('ndskj',file=open('XXX.txt','w'))
https://cloud.tencent.com/developer/ask/142887
7、chmod
https://blog.youkuaiyun.com/sprintfwater/article/details/8220185