[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: shell cript deleting backups



Incoming from mess-mate:
> 
> I backup my maildir directory every 3 days with 'konserve' ( kde
> backup utility). I've to delete manually older backups of these.
> The backup file look like this: Maildir-20050605182810.tar.gz
> Is there a utility to delete oldest backups automatically or must it
> done with a shell script?
> The difficulty resides to recognize the DATE of the backup.
> Thanks in advance for your help

  find /backup/dir -type f -name Maildir\* -mtime 4 -ok rm -f {} \;

will ask you whether it's okay to blow away any files 4*24 hours ago.
Change "-ok" to "-exec" to eliminate the "ask you" part.


-- 
Any technology distinguishable from magic is insufficiently advanced.
(*)    http://www.spots.ab.ca/~keeling      Please don't Cc: me.
- -



Reply to: