前几天在考虑如何监控Linux系统关键目录文件的变化?
为啥?被黑客给入侵了,咋办?如果能把关键目录监控起来,是个不错的想法。
如果跟rsync结合起来,还可以实现目录的备份。比如我们修改了系统配置,或者上传了文件,就可以自动备份到备机上-----------是个很好的应用。
上网搜了一下,发现有个工具叫inotify-------找找他的源代码。
inotify介绍:inotify-tools is a C library and a set of command-line programs for Linux providing a simple interface to inotify. These programs can be used to monitor and act upon filesystem events. A more detailed description of the programs is further down the page. The programs are written in C and have no dependencies other than a Linux kernel supporting inotify.
源代码下载地址 : https://github.com/rvoicilas/inotify-tools/releases
##下载源代码,编译ÿ