Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^4: File::Find seems grossly inefficient for performing simple file tasks

by taint (Chaplain)
on Apr 26, 2013 at 20:47 UTC ( #1030892=note: print w/ replies, xml ) Need Help??


in reply to Re^3: File::Find seems grossly inefficient for performing simple file tasks
in thread File::Find seems grossly inefficient for performing simple file tasks

Greetings RichardK, and thanks for taking the time to respond!
Yes. I know what you mean. The 7 bit wasn't crystal clear to me, either. :P
I'm guessing (as my OS is concerned) ctime -- Creation-time, will probably be my best choice of targets. As I'm looking for any symlink with a creation-time more than 11 minutes ago. I suppose I could create something that grabs, and holds "current time", and break out the "minutes" portion, then capture the ctime of those files searched for -- also breaking out the minutes portion; comparing >=11 minutes && rm, or something.
I don't know. Guess I've got some more reading to do.

Thanks again for your reply!

--chris

#!/usr/bin/perl -Tw
use perl::always;
my $perl_version = "5.12.4";
print $perl_version;


Comment on Re^4: File::Find seems grossly inefficient for performing simple file tasks
Re^5: File::Find seems grossly inefficient for performing simple file tasks
by RichardK (Vicar) on Apr 28, 2013 at 13:21 UTC

    Really, there's no need to do anything that complex.

    time returns seconds since the epoch so you just need to compare ctime against (time() - N) for whatever N seconds you need.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (14)
As of 2015-07-02 10:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (33 votes), past polls