[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: program to monitor directory changes (new files) and send e-mail
- From: "Anthony E. Greene" <agreene pobox com>
- To: redhat-list redhat com
- Subject: Re: program to monitor directory changes (new files) and send e-mail
- Date: Thu Mar 13 09:34:26 2003
On 13-Mar-2003/08:55 -0500, "Douglas, Stuart" <stuart douglas agt com> wrote:
>I was hoping to find a way to do this directly via an ftp daemon, but it
>looks like I'll need an external program. I want to find a way to have
>my ftp server watch a specific directory for any new file uploads and
>send an e-mail to a specified account when any occur. Anyone have any
>ideas on how this might best be done?
What about a cronjob that does this:
olddirsum=`cat olddirsum`
newdirsum=`ls --full-time /ftpdir | md5sum`
if [ "$newdirsum" != "$olddirsum" ]; then
ls /dir | mail -s 'Updated FTP Directory' my myaddress
echo "$newdirsum" > olddirsum
fi
Tony
--
Anthony E. Greene <mailto:Anthony%20E %20Greene%20%3Cagreene pobox com%3E>
OpenPGP Key: 0x6C94239D/7B3D BD7D 7D91 1B44 BA26 C484 A42A 60DD 6C94 239D
AOL/Yahoo Messenger: TonyG05 HomePage: <http://www.pobox.com/~agreene/>
Linux. The choice of a GNU generation <http://www.linux.org/>
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]