Help for this page

Select Code to Download


  1. or download this
    =item B<-a, --amount>
    
    Search for files older than <amount> days, mandatory.
    
  2. or download this
    $amount = $amount * 24 * 60 * 60;
    
  3. or download this
    $result =
      grep { /.+\.$suffix$/ and $time - ( $_->stat )[9] >= $amount }
      io($dir)->all;
    
  4. or download this
    $result = File::Find::Rule->file()
                              ->maxdepth(1)
                              ->name(qr/.+\.$suffix$/i)
                              ->mtime(">= $amount")
                              ->in($dir);
    
  5. or download this
    $result = grep { -M >= $amount / 86400 } # Convert back to days
              File::Find::Rule->file()
                              ->maxdepth(1)
                              ->name(qr/.+\.$suffix$/i)
                              ->in($dir);
    
  6. or download this
        $result =
          grep { $_ == 1 }
    ...
          map  { ( $_->stat )[9] }  # e.g i'm interested in this...
          grep { $_->name =~ /.+\.$suffix$/ } # ...and this
          io($dir)->all;