Search code examples
linuxeventsfile-iotriggersinotify

Does inotify trigger the IN_DELETE before or after deletion?


I'm trying to backup a file before it gets deleted. Can someone tell me if inotify triggers the event before or after deletion?


Solution

  • The IN_DELETE is triggered when a file/directory is deleted in the watched directory, ie after the deletion.