I have a folder with log-files each ~10 minutes:
alfred_140810-190001.json alfred_140810-191001.json alfred_140810-192002.json alfred_140810-193001.json alfred_140810-194001.json alfred_140810-195001.json alfred_140810-200002.json alfred_140810-201119.json alfred_140810-202002.json ...
How do I achieve this?
- delete all files older than a week but keep one per week
- delete all files older than a month but keep one per month
- delete all files older than a year but keep one per year
So I want one file for the last four weeks (4 files) one file per month (12 Files) and one per year (the same system like
rsnapshot is sorting his backups).