i run a simple command line to make backups of sites on my server and move them to another directly which gets backed up to an external drive.
now what I need to do is remove backups older then 5 days. i see that in the shell I can do a date sub like this;
tar -zcvf /home/sites/backups/MySite`date '+-%d-%m-%y'`.tar.gz /home/sites/MySite/
but how can I format the result of this to be the same as the format above? ( %d-%m-%y )?
date -d "5 days ago"
I can't seem to combine the new functions.
any help would be great!