Inotify

From Wikipedia, the free encyclopedia

The correct title of this article is inotify. The initial letter is shown capitalized due to technical restrictions.

inotify is a Linux kernel subsystem that provides file system event notification. It was written by Robert Love and John McCutchan to replace dnotify. It was included in the mainline kernel from release 2.6.13, and could be compiled into 2.6.12 and possibly earlier releases by use of a patch. Its function is essentially an extension to filesystems to notice changes to the filesystem, and report those changes to applications.

Its major use is therefore arguably in desktop search utilities like Beagle, where its functionality permits reindexing of changed files without scanning the filesystem for changes every few minutes, which would entail a lengthy delay and be very CPU intensive. By being told that a file has changed directly by the kernel, rather than actively looking, Beagle and such utilities can achieve change-to-reindexing times of only about a second, with very small performance hits (inotify therefore enables the use of such programs in a sensible manner; daemons are generally not accepted by distributors if they drain system performance noticeably to provide userland functionality.)

It can also be used to automatically update directory views, reload configuration files, log changes, backup, synchronize, and upload.

[edit] External links

  • inotify-tools A suite of userland utilities, based on inotify, to watch and log modifications on files and directories
  • Pyinotify A python interface to inotify.