Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Anyone have tips for ordering rotatelog2 lognames when loginterval changes? While archiving away older logs, my script must avoid archiving away the currently active log. I' have been using the max alpha file name to find the freshest (hence current & active) log to avoid
But due to naming magic of rotatelogs2, access_log_04_05_20_03_00_00 is fresher than access_log_04_05_20_03_30_00, even thoughit comes earlier in an alpha sort. While the log interval doesn't change often, it is changed occasionally, and hence this questionCustomLog "|/usr/sbin/rotatelogs2 /var/logs/access_log_%y_%m_%d_%H_%M_ +%S 10800 -300" accesslogformat
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: ordring logrotate file names
by saskaqueer (Friar) on May 20, 2004 at 09:43 UTC |