3

I'm using my Mac to try to copy the content of a smartphone's SD card to a larger card. Because I don't want all the pictures to get new creation dates I used the --preserve option like this: cp -pr /Volumes/OldSD/ /Volumes/NewSD

The file system on both the old and new cards is ExFAT and it does not show me any file owner other than my own user.

I end up with all file dates (created, last modified) being set to 'now'.

Using the -a option didn't help either.

What's going wrong?


One more observation: It only happens when copying from that SD card. When I use cp -p with files on my Mac it preserves all dates correctly.

1 Answer 1

0

After some wasted effort below…

Use Cmd ⌘ C and Cmd ⌘ V .
It just works.


Seems like you're trying to use linux syntax on Mac. They are not identical.

macOS cp man - https://ss64.com/mac/cp.html

linux cp man - https://man7.org/linux/man-pages/man1/cp.1.html

I'd guess you need cp -Rp /Volumes/OldSD/ /Volumes/NewSD

hmmm… nope. This doesn't work either.
Testing, this preserves the modified date, but sets the created date to the same value as the modified date.
enter image description here

Further research shows this seems to be a known issue… How to keep original "date created" when copying via Terminal?

ExFAT, btw cannot hold unix [or Mac] permissions or ACLs, so it's unlikely any other data than dates/owners would survive the copy.

2
  • Any idea what's going on, or why it doesn't work as expected?
    – Norbert
    Commented Jan 1, 2023 at 18:34
  • All the info I have is in the linked question.
    – Tetsujin
    Commented Jan 1, 2023 at 18:36

You must log in to answer this question.

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