executes commands upon file system events (using inotify)
Перейти к файлу
Albert S eadd46583b Several changes:
-use access() to check for existince of file
-check in main() whether prog exists, not just before running it
-helptext: tabs
-Variables which values are specified by argv-options moved to global
scope. They are write-once and don't need to be passed around all the
time.
2013-12-16 21:13:07 +01:00
adhocify.c Several changes: 2013-12-16 21:13:07 +01:00
Makefile compile with -g 2013-09-21 20:44:51 +02:00
README spelling 2013-10-07 22:52:13 +02:00

What is adhocify?
=================
adhocify is a very simple and useful tool. 

adhocify uses inotify to watch for file system events. Those events are
specified by the user. Once an event occurs, it launches a script supplied 
by the user, passing the path of the file the event occurred on as an argument. 


How do I use adhocify?
======================
Launch adhocify without any arguments and you will get the options listed.

Examples:
./adhocify -w /tmp/ /home/core/myscript.sh
------------------------------------------
Watches for IN_CLOSE_WRITE events in /tmp/, launches script /home/core/myscript.sh

./adhocify -w /tmp/ -w /var/run /home/core/myscript.sh
------------------------------------------------------
Same as above, but also watches /var/run

./adhocify /home/core/myscript.sh
---------------------------------
Watches for IN_CLOSE_WRITE events in the current directory, launches script 
/home/core/myscript.

./adhocify -m IN_OPEN -w /tmp /home/core/myscript.sh
----------------------------------------------------
Watches for IN_OPEN events in /tmp/, launches script /home/core/myscript.sh

./adhocify -w /tmp -i *.txt /home/core/myscript.sh
--------------------------------------------------
... ignores *.txt files ....