| PLEX86 | ||
|
Call script when a new file is stored within a directory
Yes, inotify. Only problem I have is that there seems to be no way of making it recursive, which I think then breaks if you want to watch a whole directory tree: inotify prog starts watching dirfoo for events someone creates dirfoo-bar inotify prog gets notified offoo-bar creation inotify prog starts watchingfoo-bar someone creates file infoo-bar inotify prog gets notified of new file infoo-bar Sounds straightforward. But apps using inotify seem to all be using queued messages. I *think* there's a case where a file can be created infoo-bar before the inotify app has received and processed an event saying thatfoo-bar has been created - meaning it only sets up the watch onfoo-bar after the file creation, and therefore never sees an event about that file being created. I'm not sure if dnotify has the same trouble, but I gather inotify is the replacement for dnotify and dnotify will no longer be supported at some time in the future. pppconfigalike in Fedora Fedora writes a simple config file for each interface, eg.etc-sysconfig-networking-devices-ifcfg-ppp0 with contents: # Please readusr-share-doc-initscripts-*-sysconfig.txt # for the documentation of these parameters. IPV6INIT=no USERCTL... Of course inotify works fine if you're just watching a directory and none of its subdirectories - but I don't think there's a way of saying "automatically watch this dir and any subdirs", which in turn means there's a potential to miss events in a new subdir immediately after its creation. cheers Jules
|
||||
Linux groups from Newsgroups The #1 Usenet Provider on the Internet
|
||||