Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
    
Please explain what you mean by observing. Changes to the files in there, additions and removals? –  Daniel Beck Jan 5 '11 at 20:56
    
I mean if there is a program which is using any file from this folder. –  robbyOnRails1 Jan 5 '11 at 21:04
    
This will be difficult. While you can use fs_usage, it's not in any way set up to run persistently (it even required root privileges). Looking forward to answers by others though. –  Daniel Beck Jan 5 '11 at 21:07

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer
    
thanks that's it! –  robbyOnRails1 Jan 5 '11 at 21:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.