Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- FOLDER=$1
- EVENTS=close_write,moved_to,moved_from,delete,delete_self
- # -------------------------------------------------------
- # MAIN CALL TO WATCH WHAT'S GOING ON INSIDE $FOLDER
- # -------------------------------------------------------
- inotifywait --format "%e %w%f" -rme $EVENTS $FOLDER | while read LINE
- do
- echo "[`date +%y/%m/%d-%H:%M:%S`] $LINE"
- done
Add Comment
Please, Sign In to add comment