diff --git a/man7/inotify.7 b/man7/inotify.7 index 100895938..4ac26d05e 100644 --- a/man7/inotify.7 +++ b/man7/inotify.7 @@ -611,6 +611,15 @@ to monitor subdirectories under a directory, additional watches must be created. This can take a significant amount time for large directory trees. +If monitoring an entire directory subtree, +and a new subdirectory is created in that tree or an existing directory +is renamed into that tree, +be aware that by the time you create a watch for the new subdirectory, +new files (and subdirectories) may already exist inside the subdirectory. +Therefore, you may want to scan the contents of the subdirectory +immediately after adding the watch (and, if desired, +recursively add watches for any subdirectories that it contains). + The inotify API provides no information about the user or process that triggered the inotify event. In particular, there is no easy @@ -633,15 +642,6 @@ for the objects to be monitored.) The inotify API identifies affected files by filename. However, by the time an application processes an inotify event, the filename may already have been deleted or renamed. - -If monitoring an entire directory subtree, -and a new subdirectory is created in that tree or an existing directory -is renamed into that tree, -be aware that by the time you create a watch for the new subdirectory, -new files (and subdirectories) may already exist inside the subdirectory. -Therefore, you may want to scan the contents of the subdirectory -immediately after adding the watch (and, if desired, -recursively add watches for any subdirectories that it contains). .SH BUGS .\" FIXME kernel commit 611da04f7a31b2208e838be55a42c7a1310ae321 .\" implies that unmount events were buggy 2.6.11 to 2.6.36