Powered by coANDco UK

How to execute a command when log changes

From How2s

You can use a program called

multitail

(http://www.vanheusden.com/multitail/examples.html)

to monitor a file, for example a logfile, and then execute a command such as for here a mac os x specific "say" command:

multitail -ex "favicon" "say accessed the site; echo " -i /var/log/apache2/access_log
Please check out our sponsor, thanks to whom How2s.org is FREE: