Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 1 down vote accepted

Look at ditto(1).   

share|improve this answer
As far as I know, "ditto" suffers from the same defect. – Nicolas Barbulesco Sep 3 '14 at 8:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .