Re: First timer: Finder Copy vs. cp
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Thread-index: Aca8CcwBCn60+yf9Edu/oAANk0QgEg== Thread-topic: First timer: Finder Copy vs. cp User-agent: Microsoft-Entourage/11.2.5.060620 on 8/9/06 12:42 PM, Terry Lambert at tlambert@apple.com wrote:
On Aug 7, 2006, at 2:01 PM, Jeffrey Ellis wrote:
Hi--
If the Finder is based on Darwin, why are there no direct commands which will replicate a Finder Copy, i.e., copy all the metadata for a given file, not just it¹s resource forks as in ditto or rsync?
I guess basically, the question from a programming standpoint, is there a way to replicate a Finder Copy without actually calling the UI?
Sorry for the n00b-ness of this question.
Thanks :)
"man cp".
The short answer is that the command line utility "cp" will copy the metadata by default unless you tell it not to by specifying "-X" as one of the arguments. So the support is already there, and on by default.
If the metadata in question includes ACLs, then you will want to specify "-p" to "preserve attributes" - primarily, protections and timestamps - of which ACLs are a subset.
-- Terry
Hi, Terry-- Wow... I saw a list of everything cp does, and you're right. It looks like it does everything. Okay, so I guess this is my next question. If cp does everything, why would anyone use ditto? I always thought that was used because of it's ability to copy resource forks. All My Best, Jeffrey _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com
participants (1)
-
Jeffrey Ellis