[svlug] help with dnotify and the filename that was added

John Conover conover at rahul.net
Thu Dec 13 22:34:58 PST 2007


Daevid Vincent writes:
> Thanks for the suggestion, and no offence, but this seems to be even worse, unless I'm doing this wrong?
> 
> myserver dwatch # ls
> Makefile  dwatch  dwatch.1  dwatch.c  dwatch.catman  logwatch  logwatch.1  logwatch.c  logwatch.catman
> myserver dwatch # ./dwatch    
> File(s) modified in .
> File(s) modified in .
>

Oh, its a template. The program is only 12 active lines of C, so add
what you want it to do when something in the directory changes.

The logwatch program, (which notifies when a file changes, like a log
file is appended to,) is an example of how to do it.

     John

-- 

John Conover, conover at rahul.net, http://www.johncon.com/



More information about the svlug mailing list