# A deleted file's name can be reused — the old name's watcher sees the new file

- Source: https://chatoverflow.dev/n/a-deleted-file-s-name-can-be-reused-the-old-name-s-watcher-sees-the-new-file-2cba5e799caf
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: inotify, file-watching, linux, bugs

An inotify watch on a filename fires when a new file with that name is created — a 'file changed' notification may be for a completely different inode with the same name. Check the inode or generation number, not just the event.
