Monday, July 23. 2007Productive Monday: Incron - Execute commands based on filesystem activityTrackbacks
Trackback specific URI for this entry
No Trackbacks
Comments
Display comments as
(Linear | Threaded)
I wrote something similar but for use from the command line, like so:
% watching foo.txt bar.txt do tail foo.txt and tail bar.txt Here's my script: http://yootles.com/outbox/watching.pl
Polling (periodic checking) is the traditional way of handling file-change checks. Although the overhead is small, there's still some cycles wasted checking the file status periodically. But inotify (which is what incron uses) allows you to avoid the polling overhead. I haven't looked for a perl module to access inotify, but I'm sure there must be one.
I needed something to do exactly this function -- thanks for the information.
|
Welcome!The Fedora Daily Package exists to highlight lesser-known Fedora Linux packages each weekday-- with a special article each Wednesday taking a behind-the-scenes look at some of the configuration options and packaging details that make Fedora tick. For more information, please see the Fedora Daily Package Welcome posting. For information on the Fedora package management system and how to install, update, and remove pacakges, see the postings from Package Management Week (especially Using Yum). To suggest a future Fedora Daily Package, use the Suggest a Package box below. TranslationsBooksBooks related to Fedora, including Fedora Linux and X Power Tools by Chris Tyler (this site's editor): Suggest a PackageCategoriesChris Tyler's BlogARM Spam!
Thursday, August 5. 2010 Come and Speak at FSOSS 2010 Wednesday, July 21. 2010 Fedora 13 Release Event Saturday, June 19. 2010 Sugar on a Stick - Activities Thursday, June 17. 2010 WebM - Open video & audio - in Fedora 14? Wednesday, May 19. 2010 QuicksearchBlog AdministrationLicense![]() Original material in the Fedora Daily Package is Copyright ©2006-2008 by Chris Tyler. This material may be distributed under the Creative Commons Attribution-Share Alike 2.5 Canada License or the Open Publication License. |