Simple code to monitor CLOSE events on specific directory using Python pynotify. #!/usr/bin/env python import os, sys from pyinotify import WatchManager, Notifier, ProcessEvent, EventsCodes def Monitor(path): class PClose(ProcessEvent): def process_IN_CLOSE(self, event): f = event.name and os.path.join(event.path, event.name) or event.path print 'close event: ' + f wm = WatchManager() notifier = N