inotifywait usage and exclude

Posted by user58542 on Server Fault See other posts from Server Fault or by user58542
Published on 2012-07-01T14:57:14Z Indexed on 2012/07/01 15:17 UTC
Read the original article Hit count: 252

I want to monitor special path to any event of create or modified files recursively in it via inotifywait but i cant know what's problem.

i have some folder that i want to exclude thame.

watchpath
    ->  folder1
        -> file1
        -> ingnorefile1 [IG]
    ->  ignorefolder1 [IG]

i have problem to exclude them.

inotifywait -mr --exclude '(ignorefolder1|folder1\/ingnorefile1)' -e modify -e create -e delete . | while read date time dir file; do

what is correct regular expression ?

© Server Fault or respective owner

Related posts about regular-expressions

Related posts about inotify