Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
CENTOS Linux
怎么做:将文件“server.log”的最大文件大小设置为 500 MB(示例)
这个怎么做?谷歌没有找到可行的解决方案。
您可以使用logrotate来处理日志文件。
它允许日志文件的自动轮换、压缩、删除和邮寄。每个日志文件可以每天、每周、每月或当它变得太大时处理。
它有一个大小选项,因此您可以将其配置为“server.log”的大小保持在 500MB 以下