#!/bin/sh # Usage: # inotify-chown : inotifywait -mrq -e create -e modify --format %w%f "$2" | while read FILE do chown -c $1 "$FILE" done