Help for this page

Select Code to Download


  1. or download this
    find /path/to/dir -type f -atime +10 -exec rm {} \;
    
  2. or download this
    use File::Find::Rule;
    File::Find::Rule->file() # only files
    ...
                    ->exec( sub { unlink( $_[2] ) } ) # delete them
                    ->in('/path/to/dir'); # starting in this path