I am looking for a script that I can schedule on a SuSE Linux Enterprise server that will run on a daily basis at 1am. I need it to look in a certain directory for directories with folder named with the date of 90 days old or older and delete them along with their contents.
This is for a Squid box. Every month or so, I go and delete daily logs that are older than 3 months. Im looking to automate this. Right now, I ssh into the box, and run the following command to remove all directories from the Month of February.
rm -rf /proxy/www/Daily/2013Feb*
If this was vbscript, it would take me a few minutes, but im not so good with linux scripting.
If someone could also tell me how exactly to schedule the job, that would be great.