If file is older than output message

I need to put together a script that checks to see if a file is older
than 15 mins and if it is it will output a message. Any ideas?
recluss1 [ Do, 03 November 2005 21:00 ] [ ID #1042858 ]

Re: If file is older than output message

recluss1 wrote:
> I need to put together a script that checks to see if a file is older
> than 15 mins and if it is it will output a message. Any ideas?

-M $_ > 15/(24*60) and print "Older than 15 minutes: $_\n" foreach [at] ARGV;
Joe Smith [ Do, 03 November 2005 21:08 ] [ ID #1042859 ]

Re: If file is older than output message

Message from "recluss1" <recluss1 [at] gmail.com> on 3 Nov 2005 12:00:46
-0800:

>I need to put together a script that checks to see if a file is older
>than 15 mins and if it is it will output a message. Any ideas?

($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime, $ctime,$blksize,$blocks)
= stat($myfile);

The variable $mtime is the time when it was created; you may then
compare two runs.

--

Ronny Mandal
Ronny Mandal [ So, 20 November 2005 14:39 ] [ ID #1066267 ]
Perl » alt.perl » If file is older than output message

Vorheriges Thema: Which is better/faster?
Nächstes Thema: cannot run the perl script