Article 6QHT8 logrotate: 2-digit file extensions

logrotate: 2-digit file extensions

by
Mig21
from LinuxQuestions.org on (#6QHT8)
Hello

I don't know why this is so hard to figure out.

I have a lot of web server logs, and even though I increased the size of the log file to 50MB before rotation, sometimes I still go over 10 files per month, when I manually clear them.

That causes a headache with my parsing scripts, which sort alpabetically (10 comes before 2).

Is it possible to configure logrotate to make two-digit file extensions even for single-digit numbers? e.g. .01 instead of .1?

Thanks in advance.
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments