How to continuously monitor the directory using dnotify /inotify command

后端 未结 3 1384
伪装坚强ぢ
伪装坚强ぢ 2020-11-29 03:43

I am new to dnotify/inotify command. Can any one help me how to write a script such that it continuously monitors a directory and indicates that there is some change or modi

3条回答
  •  不知归路
    2020-11-29 03:53

    As I said on https://superuser.com/a/747574/28782, I made a helper script that uses inotifywait without some of its direct limitations: inotifyexec

    Usage example (supposing you've added it in your system path as executable):

    inotifyexec "echo test" -r .
    

提交回复
热议问题