On Mon, 2003-10-06 at 19:53, Ed Wilts wrote: > On Tue, Oct 07, 2003 at 09:35:45AM +1000, Michael Mansour wrote: > > I have a need to delete subdirectories in a particular > > directory tree if the directories in the tree are > > older than a certain time (say one month). I'd like to > > cron this script to work in the background and clean > > that diretory tree up. > > > > What the best way/technique to do this? > > I run a script called expiredir that I grabbed off the net somewhere > eons ago. You can pass it various arguments, include number days or > directory sizes, from which it determines what to trim. > is there something I am missing? Perhaps the definition of "old" Directory. find /tree/to/be/searched -type d -mtime +30 should give a list of dirs that were not modified in the last 30 days pipe it into xargs rm -rf and I think you will be jammin Bret -- redhat-list mailing list unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe https://www.redhat.com/mailman/listinfo/redhat-list