MacOS – How to Monitor a Folder for Changes or Activities

macososx-snow-leopard

I want to delete my macport folder but I'm not sure if there is something important in it. So my idea was to observe the folder a time. Is this possible?

Best Answer

Use Folder Actions.

Alternatively, you can try starting a script using launchd with a WatchPaths. I'm pretty sure this answer can easily be adapted, by removing StartOnMount and specifying WatchPaths.

You can notify e.g. using the program say (audio notifications), or, if you use it, Growl from command line using growlnotify. If you want the latter to be really fancy, this answer might help with that.