[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: "Douglas, Stuart" <stuart douglas agt com>
- To: <redhat-list redhat com>
- Subject: RE: program to monitor directory changes (new files) and send e-mail
- Date: Thu Mar 13 11:36:31 2003
Ah, important safety tip as that will be the case.
Since I'm not comfortable implementing technology I don't fully understand, would you be so kind as to translate into English each line of your script? I think I get the basic drift of it..."take a snapshot of the contents of a directory, take another and compare the two, if their different send an e-mail, if their not, start all over again" or something like that. Getting warm?
Thanks a million!
Stuart
-----Original Message-----
From: Anthony E. Greene [mailto:agreene pobox com]
Sent: Thursday, March 13, 2003 11:14 AM
To: redhat-list redhat com
Subject: Re: program to monitor directory changes (new files) and send
e-mail
On 13-Mar-2003/09:33 -0500, "Anthony E. Greene" <agreene pobox com> wrote:
>
>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
This may nopt be a good idea to run every minute if the FTP server may
receive uploads that take more than 1 minute to complete. You might get a
notification every minute until the upload is complete.
Tony
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]