Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Reading every file in a directory

by cLive ;-) (Parson)
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)


Comment on Re: Reading every file in a directory
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2014-08-01 05:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (256 votes), past polls