Summary: Deleting files that are older than a week

From: Andreas Hoeschler (ahoesch@smartsoft.de)
Date: Fri Nov 01 2002 - 15:18:28 EST


Dear managers,

thanks a lot for your responses. Most of you suggested to do something
like

find /some/dir -mtime +7 -exec rm -rf {} \;

which works great.

Thanks,

    Andreas

> sorry if this is an off topic question. How can I remove all files/dirs
> in a directory that are older than a week. I have setup cron to make a
> database backup every night. Now I want to automatically delete (cron
> script) all backup files that are older than a week, thus always keeping
> the latest 7 backup files. I looked into the man page of rm but found
> nothing. Where do I have to look? An example would be even better.
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:25:12 EDT