I will name folders this way : DD-MM-YYYY (07-06-2011 for today).
DATE=`date +%d-%m-%Y`
mkdir $DATE
They will contain a backup of the day.
I want, in my backup script, add a command that will automatically delete folders that are a week old (in this case, when performing the backup of this day, this will delete the folder named 31-05-2011).
How do I do that ? Or, at least, how do I determine which folder is a week old ?
(Note that the folder names are not definitive and can be named the way it is easier to detect the date)