centos nohup日志文件在哪

在 CentOS 系统中,使用 nohup 命令运行程序时,默认情况下,输出会被重定向到当前目录下的 nohup.out 文件。如果你没有指定输出文件,那么 nohup.out 就是你需要查找的日志文件。

要找到 nohup.out 文件,你可以使用以下命令:

find / -name nohup.out 2>/dev/null

这个命令会在整个文件系统中搜索名为 nohup.out 的文件,并将错误输出重定向到 /dev/null(即忽略错误输出)。找到文件后,你可以使用 cattail 或其他文本查看工具来查看日志内容。

如果你在使用 nohup 时指定了输出文件,例如:

nohup your_command > output.log 2>&1 &

那么日志文件将是 output.log。你可以使用相同的方法找到并查看这个文件。

Both comments and pings are currently closed.

Comments are closed.

Powered by KingAbc | 粤ICP备16106647号-2 | Loading Time‌ 0.272