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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content