inotify-toolsinotify-tools is a set of command line utilities for the Linux inotify filesystem change notification system. | |
Download |
inotify-tools Ranking & Summary
Advertisement
- License:
- GPL
- Price:
- FREE
- Publisher Name:
- rohanpm.net
- Publisher web site:
- http://rohanpm.net/inotify-tools
inotify-tools Tags
inotify-tools Description
inotify-tools is a set of command line utilities for the Linux inotify filesystem change notification system. inotify-tools is a set of command line utilities for the Linux inotify filesystem change notification system.OK, so I made a little inotify command line utility to be called from shell scripts like so:#!/bin/sh while { inotifywait -e modify /var/log/messages; }; do echo "Log modified!" # Do some relevant command heredoneThis is probably the most efficient way to block for changes on a file from a shell script. See 'inotifywait -help' for more info. I was originally thinking I'd put this up on sourceforge as a new project, but it's just too damn small.If you don't specify which event you want to catch, all will be caught, and the event which occurred is output on stdout.#!/bin/sh EVENT=`inotifywait ~/file1` && exit && echo "file modified!" && echo "file deleted!"# etc...inotifywait will return true if an event you asked for is caught. If an event you didn't ask for is caught, it will return false; this generally occurs if you listen to a file on a particular partition, then unmount that partition, or if you listen for a specific event and the file is deleted before that event occurs, or something similar.What's New in This Release:· A bug that caused some command line options to be discarded was fixed.
inotify-tools Related Software