Best way to monitor file system changes in linux

前端 未结 3 1256
遇见更好的自我
遇见更好的自我 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条回答
  •  时光取名叫无心
    2020-12-08 08:38

    incron is a useful tool for the operations like this. You may create a configuration file for the directory or file that you want to watch.

    http://inotify.aiken.cz/?section=incron&page=about&lang=en

    in ubuntu

    sudo apt-get install incron
    

    /etc/incron.d/mynotification.conf

    # notification for user creation
    /home IN_ALL_EVENTS /opt/notify_user_created.sh $#
    

提交回复
热议问题