XShell连接服务器,程序经常因为关掉XShell就会被中断
解决方法:
nohup python XX.py 1>path_log 2>path_error &
(1) 最后的&符号表示不挂断
(2) 1> 后给出日常日志路径
(3) 2> 后给出错误路径
(4) 其他用法:
nohup XX.py 2>error.out & # 只指定错误日志路径
nohup XX.py 1>nohup.out 2>&1 & # 2路径同1
XShell连接服务器,程序经常因为关掉XShell就会被中断
解决方法:
nohup python XX.py 1>path_log 2>path_error &
(1) 最后的&符号表示不挂断
(2) 1> 后给出日常日志路径
(3) 2> 后给出错误路径
(4) 其他用法:
nohup XX.py 2>error.out & # 只指定错误日志路径
nohup XX.py 1>nohup.out 2>&1 & # 2路径同1
1.while循環的格式 while 條件: 條件滿足時,做的事情1 條件滿足時,做的事情2 條件滿足時,做的事情3 ...(省略)... demo