0

I need to watch a directory that is shared on a network for new files. I used inotifywait from inotify-tools and it is great except when the file is added from the other place.

For example: I am using laravel Homestead on vagrant. I "share" my /Code directory. When I vagrant ssh and run inotifywait DirectoryName it will show me when files are added to that directory. If I add it to the same directory on my local environment it does not trigger. I can ls -l and see that the file is there but Inotify never caught it.

Any ideas? From my research I know inotify doesn't work great with shared drives but I figured it would show something.

Sorry if this would've been better on StackOverflow

  • 1
    Are you sure your issue is not a limitation of the VirtualMachine Software? – eyoung100 Nov 17 '14 at 17:11
  • It may be. Gosh that hand't even occurred to me. I'll try and get some sort of test environment for it. To your knowledge is it supposed to work? – Dylan Buth Nov 17 '14 at 17:12
  • Well Every manual I've read states the contrary. Cygwin states something like: Be careful when moving or copying files in Windows, when logged into Cygwin. VirtualBox will let you, as long as you only do it in the Shared Folders Tab, but like Cygwin, it grays out most settings when the VM is running, plus you are using Vagrant, which may require some settings change. – eyoung100 Nov 17 '14 at 17:34
  • Ok thanks. I'll try and get a server to test it with. – Dylan Buth Nov 17 '14 at 17:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.