Date: Sat, 17 Feb 2007 00:28:45 -0500 From: Peter <pmatulis@sympatico.ca> To: freebsd-questions@freebsd.org Cc: csevern@pacesetterglobal.com Subject: Re: new file notification Message-ID: <200702170028.45501.pmatulis@sympatico.ca> In-Reply-To: <20070216233547.c4t0r75cis8k4oo4@pacesetter1.inetu.net> References: <20070216233547.c4t0r75cis8k4oo4@pacesetter1.inetu.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200702170028.45501.pmatulis>