Is it possible to use the command line utility ditto to keep two folders in sync on a single OS X machine? In other words, does ditto copy only changed files from the source, and delete removed files from the target?
|
|
|
No, ditto does not copy just the changed files. You would be better off using rsync for this. Bombich, the makers of Carbon Copy Cloner, have a great article on their site about different tools. About ditto:
About rsync:
However, I would highly recommend reading their detailed rsync document and upgrade to rsync 3.0.7 (I do it using MacPorts). EDIT: OS X rsync 3.0.7 and metadata To preserve metadata after installing the latest rsync, use the following command:
This is from the bombich.com article. All these options may not always be needed, but this can be used to back up an entire hard drive as an example. That article also has a section on backup fidelity where they report the results from the backup bouncer test suite for rsync with the above options. As an aside, to ensure that your files are being backed up properly, whichever method you use, the backup bouncer suite is very handy. |
|||||||||||||
|
|
I don't think ditto does what you believe it does. If you want to sync two folders, consider rsync instead. |
|||
|
|
|
rsync syncs one way. if you want two way sync, use unison. |
|||
|
|