Date: Tue, 07 May 2002 19:25:27 -0500 From: "Jack L. Stone" <jackstone@sage-one.net> To: Andrew <andrew@ugh.net.au> Cc: freebsd-questions@freebsd.org Subject: Re: Script Question Message-ID: <3.0.5.32.20020507192527.011c7318@mail.sage-one.net> In-Reply-To: <20020508101358.W75721-100000@starbug.ugh.net.au> References: <3.0.5.32.20020507182214.011c7318@mail.sage-one.net>
next in thread | previous in thread | raw e-mail | index | archive | help
At 10:14 AM 5.8.2002 +1000, Andrew wrote:
>
>
>On Tue, 7 May 2002, Jack L. Stone wrote:
>
>> Am running FBSD 4.5 and would like to come up with a simple script that
>> could monitor a file size, say 2MB and then send an email notice once 2MB
>> is reached. I would use cron to run it on intervals.
>
>#!/bin/sh
>
>AWK=/usr/bin/awk
>FILE=foo
>LS=/bin/ls
>SIZE=2048
>
>if [ `${LS} -s ${FILE} | ${AWK} '{ print $1 }'` -gt ${SIZE} ]; then
> echo File ${FILE} is too large
>fi
>
>Andrew
>
Ah...yes, thanks Andrew!
.... our website: http://www.sage-one.net/
Best regards,
Jack L. Stone
Server Admin
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3.0.5.32.20020507192527.011c7318>
