in reply to Deleting files

Check out the find2perl command. I believe you would be looking for:

find2perl SOMEDIR -mtime +5 -print
If you re-direct the results to a file you will end up with a skeleton of a perl script you can modify. Change the pertinate lines to make it do what you want. Further, you want to look at Perl's unlink command which does file removal.

Another way of doing it:

# hand waving prior to this # chdir $MYDIR; opendir(DIR,"$MYDIR") or die "Could not open $MYDIR:$!"; while (my $file=readdir(DIR)){ my $age= -M $file; unlink $file if int($age) > 5; } closedir(DIR);
YMMV, HTH


Peter L. Berghold -- Unix Professional
Peter at Berghold dot Net
   Dog trainer, dog agility exhibitor, brewer of fine Belgian style ales. Happiness is a warm, tired, contented dog curled up at your side and a good Belgian ale in your chalice.