inotifywait usage and exclude
10,348
Correct regexp: (ignorefolder1|folder1/ingnorefile1)
. But your expression works too.
Using a backslash to escape a non-metacharacter is an error. "/" is not a metacharacter and does not need to be escaped.
Related videos on Youtube
![sweb](https://i.stack.imgur.com/X4Z9B.jpg?s=256&g=1)
Author by
sweb
Updated on September 18, 2022Comments
-
sweb almost 2 years
I want to monitor special path to any event of create or modified files recursively in it via inotifywait but I don't know what's my problem is.
I have some folders that I want to exclude.
watchpath -> folder1 -> file1 -> ingnorefile1 [IGNORE] -> ignorefolder1 [IGNORE]
How do I correctly exclude them using a regular expression?
inotifywait -mr --exclude '(ignorefolder1|folder1\/ingnorefile1)' -e modify -e create -e delete . | while read date time dir file; do
What is correct regular expression to use to accomplish my goal?
-
jnizjo almost 12 yearswhen i create some files in ignorefolder1 event not send. i run
inotifywait -mr --exclude '(ignorefolder1|folder1/ingnorefile1)' -e modify -e create -e delete .
andecho foo > ignorefolder1/bar