If today is 2012.12.03 , my current log is abc.log and my previous date is 2012.12.02, i want abc.log.2012.12.02 to compress everytime I run the script.
I can manually run compress the file
gzip abc.log.2012.12.02 but I want the log to automate every 2am in the morning.
Every 1200midnight the file is rotating and it creates a previous date, and I want this previous date file to be compress.
I now how to use the cronjob but i dont have script to do it. Please help.