开发者

File Monitoring Daemon on Unix

I am looking to write a file monitoring daemon that runs on Fedora 8 that monitors a file and reports back when the file was last modified in minutes.

What would be the best way to do this, Im a bit of a newbie in terms of writing daemons like this?

I guess I write a script? and then run this using a d开发者_C百科aemon. If anyone has any links to point me in the right direction it would be helpful :)


My choice would be to use the cron job manager. So you write a program in the language of your choice that monitors that file and reports whatever you need. Then program your cron to execute that program as often as you whant (daily, weekle, every minute...).

Cron is easy to use, here, a tutorial. :)


Take a look at iwatch It allows you to fire off jobs only when things change, you don't have to continuously check them with cron.


You can use inotify tools for that. And get a more recent Fedora version, 8 is few years old.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜