在 Linux 中,使用 nohup 启动程序时,默认会把输出重定向到当前目录下的 nohup.out 文件(如果没手动指定重定向)。
cat nohup.out
或实时查看:
tail -f nohup.out
例如:
nohup python app.py > app.log 2>&1 &
查看方式:
tail -f app.log
如果不知道日志在哪:
ls -l nohup.out
或根据进程找:
ps -ef | grep 程序名
lsof -p 进程ID
cat:查看全部tail -n 100:看最后 100 行tail -f:实时滚动less:分页查看(按 q 退出)如果你有具体的启动命令,我可以帮你确认日志在哪。