I am storing some stream files in a folder in the IFS. The name of the each subfolder is a timestamp. Example,
/home/PROD/2020-12-08-08.08.15.087000
/home/PROD/2020-12-08-08.08.41.631000
/home/PROD/2020-12-08-08.09.07.481000
.
.
.
I want to perform cleanup every month by, ideally, dumping the folder names to an outfile and then reading the outfile and if the first 10 characters of the subfolder name equates to a date that is more than 30 days prior to todays date, delete the subfolder.
Any suggestions how to do this or something similar to accomplish the same thing
/home/PROD/2020-12-08-08.08.15.087000
/home/PROD/2020-12-08-08.08.41.631000
/home/PROD/2020-12-08-08.09.07.481000
.
.
.
I want to perform cleanup every month by, ideally, dumping the folder names to an outfile and then reading the outfile and if the first 10 characters of the subfolder name equates to a date that is more than 30 days prior to todays date, delete the subfolder.
Any suggestions how to do this or something similar to accomplish the same thing
Comment