I have a process where users ftp particular files to /home/ftp/file1.txt & /home/ftp/file2.txt any given time of the day. I setup incrontab with the following:
/home/ftp/file1.txt IN_CLOSE_WRITE myCustomCMD /home/ftp/file2.txt IN_CLOSE_WRITE myCustomCMD
I've been playing around with the different events to get the best result. I don't want a user to open the file in vim just to read and have it process the file again.
Any suggestions on the best practice to watch a file for any updates and then process the file? I tried IN_MODIFY but that doesn't trigger my command every time. I had IN_ALL_EVENTS but that failed to trigger as well.
PS: I would have tagged this with incrontab & incrond but they don't exist yet. My noob status won't let me create new tags. :(