I have two folder for Full and Incremental folder which has separate backup folder in them based on date in folder name like for example: cd /backup/Full                     Jul 12 17:52 01-07-2017Jul 12 18:32 08-07-2017Jul 15 18:20 15-07-2017cd /backup/IncrementalJul 13 12:01 02-07-2017Jul 13 12:09 03-07-2017Jul 13 12:14 04-07-2017Jul 13 12:22 05-07-2017Jul 13 12:36 06-07-2017Jul 13 12:47 07-07-2017Jul 13 12:49 09-07-2017I want to run script which will calculate the 90 days older folder based on date as name of the folder like 01-07-2017 and delete it (Strictly not to consider folder creation date). I need to run 2 script one for Full and second for Incremental using same condition.
How to delete old backups folder based on a date in file name
linux;bash;shell script