Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Checking if file has been modified in last 7 days using stat

by BazB (Priest)
on Mar 17, 2005 at 22:51 UTC ( #440573=note: print w/replies, xml ) Need Help??


in reply to Checking if file has been modified in last 7 days using stat [9]

I'm not going to give you the code, but the method should be something like:

  • Get current time since epoch (hint: time())
  • Get mtime of file in question, since epoch
  • Check if current time minus mtime is less or more than the number of seconds in 7 days.


If the information in this post is inaccurate, or just plain wrong, don't just downvote - please post explaining what's wrong.
That way everyone learns.

  • Comment on Re: Checking if file has been modified in last 7 days using stat

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://440573]
help
Chatterbox?
[toolic]: Is it possible to disable warnings from the command line?
[toolic]: I have a script which has use warnings;, and I don't want warnings right now.
[toolic]: I don't have permissions to change the script today.
[hippo]: Use perl -X
[hippo]: perlrun
[marto]: -X
[toolic]: Thanks, just found it myself... here at PM, of course.
[toolic]: It even works with FATAL... yea!

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (13)
As of 2018-02-20 15:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When it is dark outside I am happiest to see ...














    Results (271 votes). Check out past polls.

    Notices?