Pour surveiller un fichier sous Linux, je peux utiliser inotify-outils comme celui-cicomment réaliser inotify-tools méthodes shell Linux sur Mac OS X
#!/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
mais comment pourrais-je atteindre cet objectif dans OSX?
peut-il être utilisé dans un script shell? –
Non, mais il existe une librairie wrapper pour python: http://pypi.python.org/pypi/MacFSEvents/0.2.4 – Baversjo