Tin Tvrtković
2012-Mar-19 10:30 UTC
[Samba] Receiving async directory change notifications from a Windows Server host on a Linux client
Hello everyone, I need a way to programatically monitor a remote SMB share (hosted on a Windows server) for new files, in an asynchronous (inotify-like) way from a Linux machine. The directory I'd be monitoring might have a large number of files, so I'd like to avoid constant polling. I'm open to just about anything, from parsing smbclient stdout, to writing my own little C wrapper around libsmbclient or a JCIFS Java application. I'd like to know if this kind of async monitoring is even possible, and what would be a good way to go about implementing it? Thanks in advance.
Jeremy Allison
2012-Mar-22 22:10 UTC
[Samba] Receiving async directory change notifications from a Windows Server host on a Linux client
On Mon, Mar 19, 2012 at 11:30:34AM +0100, Tin Tvrtkovi? wrote:> Hello everyone, > > I need a way to programatically monitor a remote SMB share (hosted on a > Windows server) for new files, in an asynchronous (inotify-like) way from a > Linux machine. The directory I'd be monitoring might have a large number of > files, so I'd like to avoid constant polling. I'm open to just about > anything, from parsing smbclient stdout, to writing my own little C wrapper > around libsmbclient or a JCIFS Java application. > > I'd like to know if this kind of async monitoring is even possible, and > what would be a good way to go about implementing it?If you're willing to work out of git-master, Volker just added a notify command to smbclient.... Jeremy.