Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

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

by btrott (Parson)
on Apr 06, 2000 at 11:20 UTC ( #7013=categorized answer: print w/replies, xml ) Need Help??

Q&A > directories > How do I get the last accessed time for directory? - Answer 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.

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2017-03-23 16:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (290 votes). Check out past polls.