Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: How do I delete files based on their timestamp?

by btrott (Parson)
on May 08, 2000 at 21:52 UTC ( #10638=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
        find /foo/bar -mtime +7 -exec rm -rf {} \;
    
  2. or download this
    use File::Find;
    find(\&wanted, '/foo/bar');
    ...
    sub wanted {
        unlink $_ if -M $_ > 7;
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://10638]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2021-05-15 04:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Perl 7 will be out ...





    Results (150 votes). Check out past polls.

    Notices?