Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: How do I determine file creation or last-access date?

by amitbhosale (Acolyte)
on Feb 13, 2008 at 10:20 UTC ( #667750=note: print w/replies, xml ) Need Help??


in reply to How do I determine file creation or last-access date?

The ctime() function provides a way of getting at the scalar sense of the original CORE::localtime() function.

use Time::localtime; use File::stat; for ( @ARGV ) { print "\nFile: $_"; print "\n Last access time: ", ctime( stat($_)->atime ); print "\n Last modify time: ", ctime( stat($_)->mtime ); print "\n File creation time: ", ctime( stat($_)->ctime ); }

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2023-02-07 21:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (40 votes). Check out past polls.

    Notices?