Copying root owned directories...

Jerry LeVan jerry.levan at eku.edu
Wed Aug 8 12:34:52 PDT 2007


On Aug 8, 2007, at 2:35 PM, Markus Hitter wrote:

>
> Am 08.08.2007 um 19:48 schrieb Jerry LeVan:
>
>> I am puzzling over how to elegantly copy a root protected directory
>> from one mac to another mac.
>
> Create a tar archive, copy it over, unpack it on the other side.
>
> In principle you could do it with a single line:
>
> sudo tar -C / -cf- myStuff | ssh otherMac sudo tar -xvf-
>
> As you'll notice, the above line won't work, because some "" and ''  
> are missing and somehow the password for the second sudo has to be  
> typed. I let it up to you to fiddle this out (I have the root  
> password enabled here).
>
>
> Markus

Marcus I do *not* have the root password enabled on my macs :) If I  
did the
rsync stuff would work.

I just noticed that I can mount the target mac system from the Go  
menu and select
Connect to Server...

Then if I "sudo -s" on the host I can see everything on the mounted  
target when running terminal
so I could do basically do an rsync from the host to the mounted  
directory on the host :)

Jerry


More information about the MacOSX-admin mailing list