xcopy equivalent in terminal?
On the PC I would simply fire up a command prompt and use the following xcopy command:
"xcopy path\dir1\ . path\dir2\ /s /h /r /c /d"
This would copy all of the files in dir1 to dir2, including all subdirectories (/s); including all hidden files (/h); including all read-only files (/r); continuing on, rather than erroring out, if a glitch develops (/c); and copying only files that are newer than those already in the target directory where the same file exists in both directories (/d)
I've been told that the "cp" command is what I want, but a review of the man file does not indicate anything similar to the /d parameter. Apparently some versions of the linux cp command allow a -u parameter, which seems to be similar, but OS X doesn't like that.
I need to make sure that an older file is never copied over a newer file, so the equivalent of the /d parameter is necessary.
What am I missing?
MacBook Pro 2.4 / MacPro 2.66, Mac OS X (10.4.10)