Skip to content

Instantly share code, notes, and snippets.

@AlD
Created January 9, 2012 14:15
Show Gist options
  • Save AlD/1583114 to your computer and use it in GitHub Desktop.
Save AlD/1583114 to your computer and use it in GitHub Desktop.
WATCHPATH=/watch/this
IFS=$'\t'
/usr/bin/inotifywait -mrqe create -e moved_to --format "%w${IFS}%e${IFS}%f" $WATCHPATH |
while read BASEPATH ACTIONS OBJECTPATH; do
case "$ACTIONS" in
*ISDIR*)
echo $BASEPATH $ACTIONS $OBJECTPATH
;;
esac
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment