Sometimes you want to know if a certain App/code/IDE changed something on the disk, this little script / command may come in handy.
Install fswatch
install fswatch as a global command
1 | brew install fswatch |
The script
Only fswatch is not enough, here is the script that does the trick
1 2 3 4 5 | #!/bin/bash fswatch -0 $@ | while read -d "" event; \ do \ echo ${event}; done |
Save as a script e.g. monitor.sh, then give it executable permission
1 | chmod +x monitor.sh |
Now run the script and supply the path as parameter, and you will start monitoring the directory
1 | ./monitor.sh path/to/direcory |
Enjoy!