可以,nohup 的日志路径是可以改的。
nohup command &
nohup.outnohup command > /path/to/log.log 2>&1 &
>:标准输出重定向到指定文件2>&1:标准错误也写入同一文件例如:
nohup python app.py > /var/log/app.log 2>&1 &
nohup command > /path/to/out.log 2> /path/to/err.log &
nohup command >> /path/to/log.log 2>&1 &
nohup 本身不提供“配置日志路径”的参数,日志路径完全靠 shell 重定向控制如果你是用 systemd / supervisor / crontab 启动的,也可以告诉我,我可以给你对应的改法。