I have a dir called /media/simc/, I want to to set something up to monitor /media/simc/, and when a file is put in it (from this machine or any other on the network, it is a network mounted dir itself), I want to take that file and do stuff with it ("stuff", in this case meaning reading the contents and passing them to a command) (I also want to exclude a specific filename from the watch, say notest.txt)
The issues are I do not know what this file is going to be named, but I do know one thing it is not going to be named that I need excluded, and I have zero clue what I'm doing generally.
I thought inotifywait was the answer after some googling, and set up a quick demo for myself with this just to test that it would see stuff I put in there and do...stuff inotifywait -m /media/simc/ -e create (also tried with moved-to but not related really)
Then made a file in the dir and...nothing. After some troubleshooting I found out that I have to create a file in it through the machine itself, whereas my usecase is I have this directory available on the network and will be moving files into it from other machines, which when I do does not seem to proc the output.
So using nano test gives me what I want: /media/simc/ CREATE .test.swp but when I move a file into the directory or create one in it from another machine, no dice.
What are my options?