On OS X when you a copy a file using Finder, the target file has the same creation and modification times as the source file.

However when you do so using cp in Terminal both creation and modification times of the target are set to the time of copying. cp -p preserves modification time but not creation time - it is set to the value of the modification time.

Any one know of a command line tool in macs to accomplish the same behavior like in Finder when copying files?


Look at ditto(1).   

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.