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?
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;
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