/tmp/target_dir IN_MODIFY,IN_CREATE,IN_MOVED_TO /tmp/script.sh $@
contents of script.sh
echo $1 > /tmp/script.log
on executing
cp -r some_dir /tmp/target_dir
contents of /tmp/script.log
/tmp/target_dir
on executing
cp some_file /tmp/target_dir/some_dir
contents of /tmp/script.log
/tmp/target_dir/some_dir
here instead of watched directory directory on which work is done is echoed. As far as i understand from here $@ is used to display watched system path.