-
-
Notifications
You must be signed in to change notification settings - Fork 406
Open
Description
(From this Stack Exchange post)
I want to run inotifywait to watch for all CREATEs of .txt files (recursively) under, let's say, the current directory. I run the following:
inotifywait -mr --event create --format '%e %w %f' --include '\.txt$' .
In another shell (from the same directory), I run the following:
touch 1.txt # inotifywait prints "CREATE ./ 1.txt" - all good.
mkdir mydir # inotifywait prints nothing - all good.
cd mydir # inotifywait prints nothing - all good.
touch 1.txt # inotifywait prints nothing - NOT GOOD. I should have seen a "CREATE" message.
So despite me including the -r option (for which man inotifywait clearly states "Newly created subdirectories will also be watched."), my newly created subdirectory is clearly not being watched.
(FWIW, I'm running Debian GNU/Linux 12 (bookworm) and inotify-tools v3.22.6.0-4.)
This may be a dupe of #199.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels