From owner-freebsd-questions Wed May 8 0:48:57 2002 Delivered-To: freebsd-questions@freebsd.org Received: from frontend1.aha.ru (fish.zenon.net [213.189.198.214]) by hub.freebsd.org (Postfix) with ESMTP id 4583837B400 for ; Wed, 8 May 2002 00:48:53 -0700 (PDT) Received: from [195.151.197.36] (HELO 127.0.0.1) by frontend1.aha.ru (CommuniGate Pro SMTP 3.5.9) with ESMTP-TLS id 130440443; Wed, 08 May 2002 11:45:59 +0400 Date: Wed, 8 May 2002 11:45:57 +0400 From: Anton Shcherbinin X-Mailer: The Bat! (v1.53d) X-Priority: 3 (Normal) Message-ID: <1436526062.20020508114557@fastmail.fm> To: "Jack L. Stone" Cc: freebsd-questions@freebsd.org Subject: Re: Script Question In-Reply-To: <3.0.5.32.20020507182214.011c7318@mail.sage-one.net> References: <3.0.5.32.20020507182214.011c7318@mail.sage-one.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Wednesday, May 08, 2002, 3:22:14, 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. You could add the following line to your crontab (to be run e. g. every midnight): 0 0 * * * /usr/bin/perl -lwe 'print "The file grew!" if -s "/path/to/the/file" > 2_000_000' -- Anton To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message