From owner-freebsd-questions@FreeBSD.ORG Sat Feb 17 05:28:26 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5801A16A402 for ; Sat, 17 Feb 2007 05:28:26 +0000 (UTC) (envelope-from pmatulis@sympatico.ca) Received: from bay0-omc1-s31.bay0.hotmail.com (bay0-omc1-s31.bay0.hotmail.com [65.54.246.103]) by mx1.freebsd.org (Postfix) with ESMTP id 4857813C428 for ; Sat, 17 Feb 2007 05:28:26 +0000 (UTC) (envelope-from pmatulis@sympatico.ca) Received: from bayc1-pasmtp07.bayc1.hotmail.com ([65.54.191.167]) by bay0-omc1-s31.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668); Fri, 16 Feb 2007 21:28:26 -0800 X-Originating-IP: [70.53.155.213] X-Originating-Email: [pmatulis@sympatico.ca] Received: from tantra ([70.53.155.213]) by bayc1-pasmtp07.bayc1.hotmail.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.1830); Fri, 16 Feb 2007 21:36:18 -0800 From: Peter To: freebsd-questions@freebsd.org Date: Sat, 17 Feb 2007 00:28:45 -0500 User-Agent: KMail/1.9.1 References: <20070216233547.c4t0r75cis8k4oo4@pacesetter1.inetu.net> In-Reply-To: <20070216233547.c4t0r75cis8k4oo4@pacesetter1.inetu.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200702170028.45501.pmatulis@sympatico.ca> X-OriginalArrivalTime: 17 Feb 2007 05:36:18.0578 (UTC) FILETIME=[8C78E720:01C75255] Cc: csevern@pacesetterglobal.com Subject: Re: new file notification X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Feb 2007 05:28:26 -0000 Le Vendredi 16 F=E9vrier 2007 23:35, csevern@pacesetterglobal.com a=20 =E9crit=A0: > I have been looking for some kind of freebsd software that will > monitor specific directories and then email notify an email address > when new files have been added. > > I have searched the ports tree with no success. If anyone has an idea > of a solution and/or a combanation of ports that will achieve this > task, i would appreciate it very much. Why not a simple shell script run with cron? Hint: DIR=3D/path/to/target OLD_FILES=3D/var/filescheck/number NEW_FILES=3D$(ls -al $DIR | grep ^- | wc -l) if [ $NEW_FILES gt $OLD_FILES ];then mail -s "new files found in $DIR" user@mail.com < /dev/null fi echo $NEW_FILES > $OLD_FILES PM