Why logrotate rotate/zip logs after forty eight hours?

Solution Verified - Updated -

Issue

  • Why logrotate rotate logs after forty eight hours.

Environment

  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6
  • Logrotate
  • Dynamic log files, generated by application (and not by logrotate)
[root@example.com ~]# cat /etc/logrotate.d/example
/var/log/example/*.log 
     daily
     compress
     rotate 3
     missingok
     sharedscripts
     nocreate <--- Logrotate is not creating log files here. 
} 

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.