ENVIROMENT
Linux: RHEL 6.4
Log Path: /usr/iplanet/servers/https-company/logs
Log Format: user.log.03-15-2015
I have log4j log rotation enabled rotating files on a daily basis.
The rotated logs are NOT compressed & are taking up too much space.
I need a script that will run daily that will do 3 things:
- Check the folder for uncompressed log files, compress them into a ZIP file
- Delete the uncompressed log files after they are compressed
- Check the folder & delete the ZIP log files that are OLDER than 6 months.
-
send mail for any error and successful