Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Comparing file properties

by Laurent_R (Parson)
on Jun 26, 2013 at 17:46 UTC ( #1040821=note: print w/ replies, xml ) Need Help??


in reply to Comparing file properties

Why are you not simply using the -M -A or -C file test operators which return directly the age of the file in days (and fractions of days)? It seems that's doing exactly what you need.

-M : last modification

-A : last access

-c : last inode change


Comment on Re: Comparing file properties
Re^2: Comparing file properties
by mcoblentz (Scribe) on Jun 27, 2013 at 00:44 UTC
    Well, that is exactly what I am looking for. -M it is!

    Thank you!

      The documentation for the file test operators is in perlfunc under -X, which can be a little tricky to track down unless you were specifically looking for the -X operator.

      Alternatively, from the commandline, it's a little easier (although these still all take you the the same doco):

      $ perldoc -f -M $ perldoc -f -A $ perldoc -f -C $ perldoc -f -X

      -- Ken

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (13)
As of 2014-10-30 15:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (208 votes), past polls