I would need a script that can check files when they are getting uploaded/created on the server.
I wrote the script that checks, but I would like to make it run when a create event happens. I tried it with iwatch then with inotify but I experienced the problem, that if more files are copied at the same time inotify/iwatch only runs once or twice, but not as many times as many files are created.
So for example I run:
while : ; do inotifywait --format '%f: %e' -e create /path/to/watch; done
And on an other terminal but the same server of course I enter a directory with lots of files in it and inotify only notifies me on the other terminal some times, but not all the time as it should do.
Can someone give me a hint what can cause such thing to happen?
Thanks in advance.