in reply to Display A File Via Attribute
This, by the way, was edited from the output of find2perl:#! /usr/local/bin/perl -w eval 'exec /usr/local/bin/perl -S $0 ${1+"$@"}' if 0; #$running_under_some_shell use strict; use File::Find (); # Traverse desired filesystems File::Find::find({wanted => \&wanted}, '.'); exit; sub wanted { my ($dev,$ino,$mode,$nlink,$uid,$gid); return unless /^.*\.shtml\z/s && (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && (int(-M _) < 30); # now do whatever you want with the file named # by $File::Find::name # this is probably not what you want to do: print("$File::Find::name\n"); }
update: changed unlink to print$ find2perl . -name "*.shtml" -mtime -30
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(boo)Re: Re: Display A File Via Attribute
by boo_radley (Parson) on Jun 05, 2001 at 22:29 UTC | |
by bikeNomad (Priest) on Jun 05, 2001 at 22:32 UTC |