Note that there are some explanatory texts on larger screens.

plurals
  1. POCan any linux API or tool watch for any change in any folder below e.g. /SharedRoot or do I have to setup e.g. inotify for each folder?
    primarykey
    data
    text
    <p>I have a folder with ~10 000 subfolders.</p> <p>Can any linux API or tool watch for any change in any folder below e.g. /SharedRoot or do I have to setup inotify for each folder? (i.e. I loose if I want to do this for 10k+ folders). I guess yes, since I've already seen examples of this inefficient method, for instance <a href="http://twistedmatrix.com/trac/browser/trunk/twisted/internet/inotify.py?rev=28866#L345" rel="nofollow noreferrer">http://twistedmatrix.com/trac/browser/trunk/twisted/internet/inotify.py?rev=28866#L345</a></p> <p>My problem:<br> I need to keep folders time-sorted with most recently active "project" up top.</p> <p>When a file changes, each folder above that file should update its last-modified timestamp to match the file. Delays are ok. Opening a file (typically MS Excel) and closing again, its file date can jump up and then down again. For this reason I need to wait until after a file is closed, then queue the folder of that file for checking, and only a while later do I go and look for the newest file in its folder, since the filedate of the triggering file could already be back-dated to its original timestamp by Excel or similar programs. Also in case several files from same folder are used/created, it makes sense to buffer timestamping of that folders' parents to at least get a bunch of updates collapsed into one delayed update.</p> <p>I'm looking for a linux solution. I have some code that can be run on a windows server, most of the queing functionality is here: <a href="http://github.com/sesam/FolderdateFollowsFiles/blob/master/FolderdateFollowsFiles/Follower.vb" rel="nofollow noreferrer">http://github.com/sesam/FolderdateFollowsFiles/blob/master/FolderdateFollowsFiles/Follower.vb</a></p> <p>Available API:s<br> The relative of inotify on windows, ReadDirectoryChangesW, can watch a folder and its whole subtree; see bWatchSubtree on <a href="http://msdn.microsoft.com/en-us/library/aa365465(VS.85).aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/aa365465(VS.85).aspx</a></p> <p>Samba?<br> Patching samba source is a possibility, but perhaps there are already hooks available? Other possibilities, like client side (various windows versions) and spying on file activities in order to update folders recursively?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload