lundi 9 mars 2015

BASH - backup retain

I need some help with this - i have a backup retain and organize script I have a folder full of backups with the pattern like ReportsBackup-20140309-12-00. there is what I need:



  1. remove all the files and just let the ones from 04-00h i have done like this


removals =`/bin/ls | grep -v -04-00`


rm /mnt/backupstorage/$removals


the question is how can I isolate the files base in the pattern ReportsBackup-20140309-12-00.per year and month ?


thank you


Aucun commentaire:

Enregistrer un commentaire