首页 > 解决方案 > 为什么将日志存储在 root 中不正确?

问题描述

我被指示永远不要将我的日志存储在“/”中。我只是想知道是否有人可以给我这背后的逻辑?这可能听起来很愚蠢,但我觉得理解是我提高的必要条件。

I have moved the logs, and they are not in the root, I was just looking to get a greater understanding of why?

标签: linuxshellunixloggingsysadmin

解决方案


root as in/是文件系统的根目录,并且有一个预定义的结构和顺序。

root/rootroot用户的主文件夹,因此它具有不同的用途。

虽然您可以将日志存储在大多数文件夹中,但建议您不要这样做,因为普遍接受的标准是日志位于 /var/log/` 文件夹中,再次在类别/文件夹中进一步结构化


推荐阅读