Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Answer: How do I get the last accessed time for directory?

( #7013=categorized answer: print w/ replies, xml ) Need Help??

Q&A > directories > How do I get the last accessed time for directory? contributed by btrott

With stat:
my $atime = (stat "foo_dir")[8];
Or, if you'd like a nicer interface to stat, use File::stat:
use File::stat; my $stat = stat "foo_dir"; my $atime = $stat->atime;
Either of those will put the last accessed time, in epoch seconds, into $atime.

Comment on Answer: How do I get the last accessed time for directory?
Select or Download Code
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2014-12-21 21:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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





    Results (108 votes), past polls