#!/bin/sh inotifywait -r -m "$1" -e create -e moved_to | while read -r path action file; do echo "The file '$file' appeared in directory '$path' via '$action'" done # vim: expandtab sw=2 ts=2