NAME
ubinbox
SYNOPSIS
ubinbox {-c <command>} {-d} <directory>
DESCRIPTION
ubinbox monitors <directory> for new files.
If a file is created in the directory, ubinbox lists ALL the files in the directory.
If you specify a <command>, then the system invokes that <command> from <directory> once for each file in <directory>. It is the responsibility of <command> to move/remove the files.
If ubinbox is monitoring a directory, it can be forced to execute <command> as if a file has arrived by using SIGRTMIN.
Typically, the system uses this to monitor a directory, pick up new files, process them, and then either delete or move them.
FLAGS
| FLAG | ARGUMENT | TYPE | DESCRIPTION |
|---|---|---|---|
| -c | command | text | command to execute when a new file is created in directory |
| -d | Run ubinbox as a daemon (detach from starting process). |
ERRORS
EXAMPLE
Create a script, eg /tmp/echo
cat $1 > /tmp/$1
rm -f $1
Then assuming a directory called /data/incoming exists start a ubinbox monitor:
ubinbox -d -c /tmp/echo /data/incoming
if a running ubinbox has pid 12345: kill -SIGRTMIN 12345 will also trigger the command