Re: First timer: Finder Copy vs. cp
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com On Aug 7, 2006, at 2:01 PM, Jeffrey Ellis wrote: Hi-- Sorry for the n00b-ness of this question. "man cp". -- Terry _______________________________________________ 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... 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? Thanks :) 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. This email sent to site_archiver@lists.apple.com
participants (1)
-
Terry Lambert