If file is older than output message
am 03.11.2005 21:00:46 von recluss1I 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?
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 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;
Message from "recluss1"
-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