How to create a service that monitors a file
Hi everyone,
I would like to create a service that monitors a file.
For example, the service would monitor the /var/log/messages file, waiting for a line that contains the word "sshd". When it finds it, it takes a certain action.
Can anyone help me?
Thanks!
|