Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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 browsing the Monastery: (6)
As of 2015-07-07 01:44 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 (86 votes), past polls