Updated README

This commit is contained in:
Albert S. 2014-10-22 00:30:53 +02:00
parent 252df6f648
commit fa9e9a0dfb

25
README
View File

@ -1,11 +1,12 @@
What is adhocify? What is adhocify?
================= =================
adhocify is a very simple and useful tool. adhocify uses inotify to watch for file system events.
Once an event occurs a script will be launched.
adhocify uses inotify to watch for file system events. Those events are It can pass the path of the file the event occured on to this script.
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.
Requirements
============
adhocify only runs on Linux. You need a kernel and libc with inotify support.
How do I use adhocify? How do I use adhocify?
====================== ======================
@ -16,6 +17,19 @@ Examples:
------------------------------------------ ------------------------------------------
Watches for IN_CLOSE_WRITE events in /tmp/, launches script /home/core/myscript.sh Watches for IN_CLOSE_WRITE events in /tmp/, launches script /home/core/myscript.sh
/adhocify -w /tmp/ /home/core/myscript.sh {}
------------------------------------------
Same as above, but also passes the file an event occured on to that script. (argv[1]).
./adhocify -w /tmp/ /bin/echo the file {} was written to
---------------------------------------------------------
Running
echo "Test" > /tmp/test
Will print in the shell adhocify was launched in:
the file /tmp/test was written to
./adhocify -w /tmp/ -w /var/run /home/core/myscript.sh ./adhocify -w /tmp/ -w /var/run /home/core/myscript.sh
------------------------------------------------------ ------------------------------------------------------
Same as above, but also watches /var/run Same as above, but also watches /var/run
@ -34,5 +48,4 @@ Watches for IN_OPEN events in /tmp/, launches script /home/core/myscript.sh
... ignores *.txt files .... ... ignores *.txt files ....