Чтобы отслеживать файл в Linux, я могу использовать такие инструменты inotify
#!/bin/bash
# with inotify-tools installed, watch for modification of file passed as first param
while inotifywait -e modify $1; do
# do something here
done
, но как мне этого добиться в OSX?