I am running inotifywait
on a directory of files:
inotifywait --quiet --monitor \
--event modify \
--event moved_to \
--event moved_from \
--event move \
--event unmount \
--event create \
--format '%w' /path/to/*.json | \
while read FILE; do
echo "$FILE was changed."
done
This works well until I run git checkout [some existing branch name]
. After that, inotifywait
stops responding to files that git
updated when checking out the branch (That is, is stops responding to files that are different between the two branches).
Why does inotifywait
stop responding to these files? Is there a way for it to re-see those files?