4
1
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?
1As far as I know, "ditto" suffers from the same defect. – Nicolas Barbulesco – 2014-09-03T08:25:08.270
links for
– SherylHohman – 2018-06-09T01:35:23.577ditto
: http://osxdaily.com/2014/06/11/use-ditto-copy-files-directories-mac-command-line/ and https://stackoverflow.com/a/40974437/5411817