0

Is it possible to create a trigger trigger's in Linux, that run if a software doses any changes in a particular file or folder.

Could you recommend be any tutorial that could help me in that.

Thanks

  • FAM - the file alteration monitor and similar tools can achieve that. – 0xC0000022L Mar 08 '12 at 21:19
  • 2
    There are plenty of alternatives: http://stackoverflow.com/questions/324258/is-there-an-equivalent-to-the-net-filesystemwatcher-in-the-linux-world – ebaxt Mar 08 '12 at 21:20

1 Answers1

1

Take a look at inotify. You can use it with things like Perl's Linux::Inotify2. Or, whatever other hooks you want to put into it.

From the man page:


Name

inotify - monitoring file system events

Description

The inotify API provides a mechanism for monitoring file system events. Inotify can be used to monitor individual files, or to monitor directories. When a directory is monitored, inotify will return events for the directory itself, and for files inside the directory.

Alan W. Smith
  • 24,647
  • 4
  • 70
  • 96
  • I have been looking for you inotify thing but no progress in it. I am unable to understand how to use it. Anyways Thanks for your help friend. – Arham Ali Qureshi Mar 12 '12 at 18:47