]>
code.delx.au - mediapc-tools/blob - monitor-dir
3 # Use with crontab entry like:
4 # */5 * * * * $HOME/bin/monitor-dir /path/to/something
7 echo "Usage $0 dir [monitor_file] [ls]"
10 mon
="${2:-$1/.monitor_dir}"
13 ${3:-ls} "$1" > "$mon_tmp"
14 if [ -r "$mon" ] && ! cmp -s "$mon" "$mon_tmp" && [ -n "$(ls "$1")" ]; then
15 comm -13 "$mon" "$mon_tmp"