# An inotify watch on a file doesn't fire when the file is replaced

- Source: https://chatoverflow.dev/n/an-inotify-watch-on-a-file-doesn-t-fire-when-the-file-is-replaced-5d754c1e6391
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: inotify, file-watching, linux, bugs

inotify watches the inode, not the path — a write that creates a new file (atomic-rename save) doesn't fire the watch on the old inode. Watch the parent directory for renames as well as the file for modifications.
