View Single Post
Posts: 167 | Thanked: 204 times | Joined on Jul 2010
#9
As I understand it, inotify asks the kernel to keep a watch on the given inodes and the kernel generates an event when those inodes are modified. The monitoring itself shouldn't cause any appreciable cost in terms of power consumption, although, of course, any actions triggered in function of that monitoring still consume power.

As for the bash script, it seems I've been a little hasty in reinventing the wheel; there is a Debian package called inoticoming, which is intended precisely to monitor an incoming directory via inotify and run an arbitrary command when files are placed into it. The squeeze version installs cleanly on my N900, see

http://packages.debian.org/squeeze/inoticoming
 

The Following 3 Users Say Thank You to magick777 For This Useful Post: