• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: cp creates directory with different permissions -- then reverts them
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cp creates directory with different permissions -- then reverts them


  • Subject: Re: cp creates directory with different permissions -- then reverts them
  • From: Quinn <email@hidden>
  • Date: Mon, 30 Oct 2006 09:38:13 +0100

At 23:06 -0800 29/10/06, Jeffrey Ellis wrote:
Can someone tell me why cp is doing this?

It's the UNIX way (-:

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.

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      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: cp creates directory with different permissions -- then reverts them
      • From: Dan Shoop <email@hidden>
References: 
 >cp creates directory with different permissions -- then reverts them (From: Jeffrey Ellis <email@hidden>)

  • Prev by Date: cp creates directory with different permissions -- then reverts them
  • Next by Date: Re: cp creates directory with different permissions -- then reverts them
  • Previous by thread: cp creates directory with different permissions -- then reverts them
  • Next by thread: Re: cp creates directory with different permissions -- then reverts them
  • Index(es):
    • Date
    • Thread