我在inotifywait
文件目录上运行:
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
这在我运行之前运行良好git checkout [some existing branch name]
。之后,inotifywait
停止响应git
签出分支时更新的文件(即停止响应两个分支之间不同的文件)。
为什么inotifywait
停止响应这些文件?有没有办法让它重新查看这些文件?