

How to signal an already running process whenever some file is renamed - db42

I am working on a project to manage files. The idea is to transfer information about a file's location through file name itself. So, whenever a user renames a file, the process will scan the filename and move it to the desired location. But I don't know how to signal the process whenever any file is renamed.
======
zimpenfish
Isn't this the kind of thing that FAM was invented for?

<http://oss.sgi.com/projects/fam/>
<http://en.wikipedia.org/wiki/File_alteration_monitor>

(Or specific things like inotify on Linux:
<http://en.wikipedia.org/wiki/Inotify> )

~~~
zimpenfish
(as in your process monitors the directory itself and picks up the renames
without having to be signalled by another process - although you could just
give it a SIGHUP when another process using FAM/inotify notices the rename but
why complexify things?)

~~~
db42
But then, process will have to continuously keep a check on the directory. So,
the time interval will need to be figured out for the process to wake up and
check the directory for the renames.

