I'd like to automatically run a one way sync between two local directories using rsync. Meaning when a change is detected in a file of /dir1 or its subdirs, the following command should run:
rsync -rtuv /dir1 /dir2
How can I go about achieving this with fswatch?
Is it possible to supply arguments for rsync to only copy the actual files that were changed, as given by the fswatch events?