An application has a log directory, in which a alot of log output is created. The file structure in this log directory looks something like this:
localhost:/var/log/myapp # ls appClient22334.a appClient22336.a appClient22338.a appClient22334.b appClient22336.b appClient22338.b appClient22334.c appClient22336.c appClient22338.c appClient22335.a appClient22337.a appClient22339.a appClient22335.b appClient22337.b appClient22339.b appClient22335.c appClient22337.c appClient22339.c
Every day the application generates hundreds of those files, which are all to be stored. The numbers are incrementing.
For most purposes I use logrotate to store and compress log files on a daily base, but in this case I fail to see how this could be done.
The ideal solution would be to have something like
appClient.20120324.gzip appClient.20120325.gzip appClient.20120326.gzip
Can anyone of you nudge me into the right direction, if this can be done while using logrotate (maybe a clever way to use
prerotate?), or if it is faster/easier to write a specific bash script?