11/01/2016

Compress logs by date

Sometimes it happens to find a service which rotates logs but don’t rename them using an easy date format (for example logYYYYMMDD.log), that’s horrible if you have to archive those logs :\

Here is a simple bash script I use to compress them based file modification date, check comments for adapt it to your log names.

download: logmonth_1.0.sh
md5sum: 4b587eb3c2d9ac413d81a0bdc055c6cf

 

I commenti sono bloccati.