Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • 1
    According to the man pages for log rotate, "maxage count - Remove rotated logs older than <count> days. The age is only checked if the logfile is to be rotated." Since there was no rotation, there no check Commented Oct 19, 2017 at 11:47
  • @RamanSailopal. okay. so is there any way we can achieve this without rotation Commented Oct 19, 2017 at 12:03
  • Use the find command with -ctime/mtime and -delete Commented Oct 19, 2017 at 12:06
  • @RamanSailopal if i include that in post rotate same will happen right if there is no rotation Commented Oct 19, 2017 at 12:13
  • You will need to run the find and delete of another process, maybe off a daily cron job. Commented Oct 19, 2017 at 12:18