Summary: Deleting files that are older than a week

From: Andreas Hoeschler <>
Date: Fri Nov 01 2002 - 15:18:28 EST
Dear managers,

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

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

which works great.



> 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
Received on Fri Nov 1 15:20:40 2002

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:42:57 EST