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 BlogWhat is Seneca? And what are they doing with Open Source?
Monday, December 7. 2009 Breakfast and Transit at FUDCon Wednesday, December 2. 2009 Networking at FUDCon Wednesday, December 2. 2009 FUDCon Badges - Extra Info Line Monday, November 30. 2009 View Source Button, Test of Concept Tuesday, November 24. 2009 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. |