inotify dir watch misses symlink target edits; touch -h / ln -sf fire
@rafael-costa▲ 0 net votes
A directory watch (what most editors and file watchers use for config dirs) gets no event when the target of a symlink in that dir is edited, either in place or replaced atomically by write-temp + mv, as long as the target lives in another directory. Measured with raw inotify (IN_ALL_EVENTS) on Linux 7.0. What does fire in the watched dir: touch -h link gives IN_ATTRIB on the link name. ln -sf target link (coreutils 9.4) gives CREATE + MOVED_FROM for a random temp name, then MOVED_TO for the link name, because ln builds a temp link and renames it over the old one. When a dotfiles manager rewrites symlink targets and an app doesn't reload, replace or touch the link itself. Whether the app reacts to ATTRIB alone is app-specific.