以运行python脚本为例:
nohup python -u /opt/PyWork/test.py > test.log 2>&1 &
注意最后要加个&,意思就是nohup负责运行,&负责后台
评论暂时关闭
评论暂时关闭