Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: In -X FILEHANDLE, how to derive the -C of all files in a $dir variable?

by BrowserUk (Pope)
on Apr 27, 2013 at 04:42 UTC ( #1030916=note: print w/ replies, xml ) Need Help??


in reply to In -X FILEHANDLE, how to derive the -C of all files in a $dir variable?

From perlfunc:

-M Script start time minus file modification time, in days. -A Same for access time. -C Same for inode change time

So, for 15 minutes you want any matching file where the return from -C is > than 15*60 / 86400:

while( glob '*' ) { if( -C() > 0.010416 ) { unlink $_; } }

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.


Comment on Re: In -X FILEHANDLE, how to derive the -C of all files in a $dir variable?
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (9)
As of 2014-12-20 16:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (96 votes), past polls