Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: Reading every file in a directory

by cLive ;-) (Prior)
on Sep 29, 2012 at 06:33 UTC ( #996343=note: print w/replies, xml ) Need Help??

in reply to Reading every file in a directory

I'm really tired and maybe missing something, but is there any reason you can't just run this in the shell?

 find /path/to/dir -mtime +5 -type f|xargs rm

If the files are only getting updated when the user last logs in then that's a perfectly acceptable solution and doesn't involve you having to parse the files in question.

(ninja edit - add restrict to files)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://996343]
[Discipulus]: each node has 2 descendants only: can i just compose hash keys usinng coords?
[karlgoethebier]: Discipulus: you shouldn't smoke turkish spices before noon
[Discipulus]: karl you says the same of my mom: in your place I'd been
[Discipulus]: preoccupied.. ;=)
Discipulus stopped with turkisk spices anyway.. but better hashes than arrays!
[oiskuu]: Discipulus, from the edge or from the top?
[Discipulus]: oiskuu from the top aka 0-0 coords

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (12)
As of 2018-03-19 10:59 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (239 votes). Check out past polls.