[X-Unix] Monitoring file usage and emailing based on changes

Stroller MacMonster at myrealbox.com
Sun Mar 28 23:48:30 PST 2004


On Mar 29, 2004, at 7:13 am, David Haines wrote:

> I think that surely there must be a way to do this with Cron, but 
> don't know
> how to proceed exactly.
>
> What I'm looking for is a way to monitor an FTP server (which is all 
> it does
> service-wise) running Mac OS X 10.2.8 (server) for changes to the 
> users' FTP
> directories, and sending an email (via sendmail) when a change has 
> occurred,
> and/or once per day, perhaps sending a notification (change=none, if 
> nothing
> has changed) ?
>
> What would you do, have you done it, and how well is it working for 
> you ?

I think I'd do something like this as a daily cron job:
   find /path/to/ftp/files -newerct '24 hours ago' -print

But it depends where the users keep their ftp files & such. If they 
have individual ~username/ftp/ folders, then you have to be a little 
bit more clever, and a bash script could email individual users 
(providing you have sendmail / postfix configured correctly) when their 
own files change.

Feel free to post more precise specifications if you'd like more help,

Stroller.



More information about the X-Unix mailing list