I am using inotifywait to monitor a folder by using below way.
inotifywait -m /tmp/test -e CLOSE_WRITE -e MOVED_FROM --format '%T' --timefmt '%s' -q|<action>
In here if any change in /tmp/test i want to do an action.
For example if deleted two files it fires MOVED_FROM event, but i want to call only an action once. If it again modify i wan to fire the same action.
I tried to get the time. And try to get a uniq . But it did not work.
Please let me know any one experience this.