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.
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.