Re: cp creates directory with different permissions -- then reverts them
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com It's the UNIX way (-: S+E -- Quinn "The Eskimo!" <http://www.apple.com/developer/> Apple Developer Relations, Developer Technical Support, Core OS/Hardware _______________________________________________ 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... At 23:06 -0800 29/10/06, Jeffrey Ellis wrote: Can someone tell me why cp is doing this? Historically, Mac OS and UNIX had a very different perspectives on file copying. UNIX considers the copy to be a new file that just happens to have the same content as the original. Mac OS tries to make the new file as close as possible to the original. This affects other things beyond the permissions. For example, if you copy a file on traditional Mac OS (or using technologies that conform to traditional Mac OS semantics, like the Finder), the new file has the same creation and modification date as the original. If you do this using "cp", the new file's creation and modification dates are set to the time that you did the copy. There are many arguments as which of this approaches is 'correct', but they are mostly pointless IMHO. Both approaches have their pros and cons. Fortunately, Mac OS X bypasses these arguments by providing you with tools to do both. "cp" gives you the traditional UNIX semantics. "ditto" gives you the traditional Mac OS semantics. This email sent to site_archiver@lists.apple.com
participants (1)
-
Quinn