Best way to monitor file system changes in linux

前端 未结 3 1254
遇见更好的自我
遇见更好的自我 2020-12-08 07:50

I\'m looking at building a file system sync utility that monitors file system activity, but it appears that some of the file system monitoring features in the linux kernel a

3条回答
  •  -上瘾入骨i
    2020-12-08 08:52

    There's a good lib providing file descriptors or process with inotify. It has his own C API and the inotifywatch util (good for scripts), all in inotify-tools package.

    • http://www.ibm.com/developerworks/linux/library/l-ubuntu-inotify/index.html
    • http://www.infoq.com/articles/inotify-linux-file-system-event-monitoring

    I strongly disagree that fanotify will outdate inotify.

    FAM and gamin are very good server/client options. Both of them use inotify as first option over the outdated dnotify and polls. I prefer gamin.

提交回复
热议问题