【问题标题】:Logrotate to ignore the most recent fileLogrotate 忽略最近的文件
【发布时间】:2020-06-09 20:18:11
【问题描述】:

我将使用 logrotate 来管理日志文件,但是,我只想轮换超过 2 天的日志文件(我不希望 logrotate 更改最近 2 天日志的文件名)。有没有办法做到这一点?

我现在的配置是这样的:

/tmp/test.* { 失踪的 日常的 旋转 2 }

【问题讨论】:

标签: linux bash logrotate


【解决方案1】:

根据 logrotate 的 man 条目:

minage *count*: Do not rotate logs which are less than <count> days old.

https://manpages.debian.org/stretch/logrotate/logrotate.8.en.html

【讨论】:

    猜你喜欢
    • 2023-04-09
    • 2018-06-01
    • 1970-01-01
    • 2011-12-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-08-31
    • 1970-01-01
    相关资源
    最近更新 更多