http://qs1969.pair.com?node_id=602142


in reply to How do I find and delete files based on age?

untested Perl one liner:
perl -e 'system "rm -rf $_" if ( -M $_ > 14 ) for ( glob "/var/backups +/repository/DATE_*" );'
Note: this is a deliberately simplistic example. To optimise it to avoid shelling out (using either File::Find or putting the glob in a recursive subroutine) would require more Perl experience than OP suggests.

Update: Newbies will particularly benefit from Learning Perl, Third Edition - Making Easy Things Easy and Hard Things Possible By Randal L. Schwartz & Tom Phoenix.

-M

Free your mind