This is my current situation (simplified, in fact of course many and large files):
Dir1/
a b c
Dir2/
a b c d
This has happened before:
- a b c were copied from Dir1 to Dir2.
- Within Dir2 the timestamps of a b c got modified accidentally.
- d got added to Dir2 intentionally.
Now I want to do this: Sync Dir2 back to Dir1. (To whom it concerns: I use rsync)
- d is new and hence should get copied.
- a b c in Dir2 and Dir1 are identical in size and data content, but their filestamps differ. Hence they would be unnecessarily copied.
I know that rsync can either compare files by --checksum or --size-only. But this disk/cpu intensive check would have to be repeated in every future sync. Instead I rather want to once and for all correct my mistake by restoring the original file timestamps from those in Dir1 to those in Dir2 with a tool. Then my mistake is corrected, and future syncs can run efficiently.
On Windows these tools are able to copy timestamps only (without copying data):
Does anyone know an appropriate CLI / GUI tool for Mac OS X?