In my bash script I create a directory each month for backups as follows:DAY=$(date -d $D '+%d')MONTH=$(date -d $D '+%m')YEAR=$(date -d $D '+%Y')mkdir -p /var/app/backup/$DAY$MONTH$YEARFor example I get: 01012000 01022000 01032000 . . 01012014 01022014 01032014 01042014 . .After years we want to remove the directories that are older than half of a year. For example - the directories from 01012000 until 01062000 should be removed at 1/1/2015.What is the best approach (from bash script) in order to remove the directories that are older than half a year, regarding that we have the date in the directory's name?
Remove old directories according to directory's name?
bash;files;find;timestamps