linux – 使用logrotate的无限日志

在正常的logrotate.d配置文件中,有没有办法设置无限量的潜在日志?

我能想出的唯一一件事就是设置一些永远无法满足的疯狂数字.就像是:

/var/log/app/* {
  missingok
  weekly
  copytruncate
  rotate 10000000000
  compress
  notifempty
  olddir /var/log/app/old
}

但这对我来说似乎很不好看.

最佳答案
UNIX logrotate man page开始:

rotate count

Log files are rotated times before being removed or mailed to the
address specified in a mail directive. If count is 0,old versions are
removed rather then rotated.

所以我想你需要写一个庞大的数字来工作.

相关文章

文章浏览阅读1.8k次,点赞63次,收藏54次。Linux下的目录权限...
文章浏览阅读1.6k次,点赞44次,收藏38次。关于Qt的安装、Wi...
本文介绍了使用shell脚本编写一个 Hello
文章浏览阅读1.5k次,点赞37次,收藏43次。【Linux】初识Lin...
文章浏览阅读3k次,点赞34次,收藏156次。Linux超详细笔记,...
文章浏览阅读6.8k次,点赞109次,收藏114次。【Linux】 Open...