Closed saurabhnanda closed 4 years ago
Yes I think this behavior makes sense, since the reference count for hard links is stored in the inode itself (I think) and therefore creating a new link will cause a change to the file metadata.
The man page for inotify
actually mentions this explicitly, saying an IN_ATTRIB
event will be fired when there's a change in link count.
@saurabhnanda I'm going to close this, but feel free to let me know if there are more questions or a feature request connected with it.
I'm trying to chase down some weird behavior where modification events are being triggered by
fsnotify
, if hard-links to files (withing watched directories) are either created or deleted.Note: The hard-link is NOT being created inside the watched directory. Instead, a hard-link TO a watched file (i.e inside a watched directory) is being created in a directory that is not being watched.
I have been unable to pin-point what is causing these events to be triggered, but is this known/expected behaviour?