Background and issue
I moved to Mac OS X recently and bumped into the "feature" of Mac where copying files from an external drive resets the file modification/update date/timestamp to the current date (which Windows does not), causing a disaster for my 10+ years of backup work files where date is important.
So, before I learned how to avoid that (e.g. using the -p "preserve" flag in the "cp" copy command) I have in the meantime added to my new Mac hard drive many more files as well as updating existing old files.
- I have a backup external hard drive with all my old data and proper modification dates
- I have a Mac hard drive with reset modification file dates (a single or two particular days)
- The Mac hard drive has all the "true" and "current" file contents with files modified and added
What I need
I need to
- Copy all the original files from the external harddrive, preserving file metadata (really only modified date), but ONLY overriding the new internal Mac hard drive IF
- The file contents (md5 or whatever) is the same OR
- The file was updated after the day (which of course I can see on all files) on which the original disasterous cope was performed (implying the file is new or modified)
- Ensure the copy leaves all the new and modified files completely intact on the Mac internal hard drive.
- "No prompting/stopping of the copy of any kind (ie not verbose) is required but is o.k."
- "Recursive copy - obviously I would like to copy all* files folders and subfolders found in export"
How can this be done, any idea?
I've read all I could on Stack Overflow and checked man pages and info on both "rsync" and "cp" but cannot find a way...
Does anyone have any good tools, scripts, tricks, ideas?