copying meta data when using cp in terminal

I'm copying images off my camera into a folder on the desktop.


i'm using the command.


find . name "*.JPG" -exec cp {} /[desktop]


however the files do not carry over the metadata for the original images. ie. All the pictures apear as taken the day i made this transfer.


Anyone know how to ensure the metadata is carried over also ?


Thanks,.


G

MacBook Pro, Terminal Shell scripting

Posted on Feb 14, 2012 5:44 AM

Reply
2 replies

Feb 14, 2012 12:49 PM in response to J D McIninch

Just to add to J D McIninch's answer, keep in mind the distinction between image metadata (eg, EXIF tags), which the system does not extract from the file, and the filesystem metadata (plus resource fork, if any), which cp copies with the -p option.


Image metadata is indexed by Spotlight (if compatible or the right plugin is installed); and you should be able to access it with your image manager.


To examine metadata indexed by Spotlight, use mlds. If you need a CLI tool to manipulate image metadata, you probably couldn't do much better than Phil Harvey's ExifTool


<http://www.sno.phy.queensu.ca/~phil/exiftool/>

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

copying meta data when using cp in terminal

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.