If file is older than output message

If file is older than output message

am 03.11.2005 21:00:46 von recluss1

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?

Re: If file is older than output message

am 03.11.2005 21:08:28 von Joe Smith

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 @ARGV;

Re: If file is older than output message

am 20.11.2005 14:39:48 von Ronny Mandal

Message from "recluss1" 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