I have a large tree containing a lot of photos on an external drive that was formatted with one of the linux filesystem types (don't remember which one). It's mounted on my mac and I'm trying to copy the photos over, but it looks there are files named 'somePic.jpg' and 'somePic.JPG'. When I try to copy them, OSX complains that there are duplicate names and quits. How can I copy them over while ensuring the file names are unique? I can't just rename any dupes on the source tree first because OSX mounted the drive read only.
I played around w/ cp, gcp, sed and xargs for a couple of hours, but was unable to get anything working.
Best Answer
...per your comment on the question...
If
.jpg
and.JPG
are your only issues, that should just work.You can also add a
p
rint primitive to the filename substitution to get a list of all of those filenames which were changed:As near as I can tell,
pax
should already be installed on an OSX system, and so this should amount to a pretty stress-free solution overall.If the problems turn out to be more profound after all, though, it may also be of interest to you that
pax
supports...