Unix上的文件监视守护程序 [英] File Monitoring Daemon on Unix

查看:80
本文介绍了Unix上的文件监视守护程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望编写一个在Fedora 8上运行的文件监视守护程序,该守护程序监视文件并在几分钟内最后一次修改文件时向您报告。

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 daemon. If anyone has any links to point me in the right direction it would be helpful :)

推荐答案

我的选择是使用cron工作经理。因此,您可以使用自己选择的语言编写一个程序,该程序可以监视该文件并报告所需的内容。然后对您的cron进行编程,使其尽可能多地执行该程序(每天,每周,每分钟...)。

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易于使用,此处,是一个教程。 :)

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

这篇关于Unix上的文件监视守护程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆