Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know at least three ways to monitor a folder/file for changes and execute a shell script on change.

  • First, use "Folder Actions" of Automator

  • Second, the launchd.plist approach but it seems the folder been monitored couldn't go through recursively.

  • Third, use native FSEvents API on Mac OS X. like the modified fswatch utility

My question is that which one cost system resource (CPU or memory) less ?

share|improve this question
1  
It's probably safe to assume that the first two rely on the third -> all are rather efficient. – patrix Jan 3 '13 at 16:08
    
Folder actions are also limited to a single folder without subfolders. And they are only run when files are added, not when they are modified. – user495470 Jan 3 '13 at 18:31

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.