[OS X TeX] Copying gwTeX

Aaron Jackson jackson at msrce.howard.edu
Tue Sep 27 23:19:09 EDT 2005


On Sep 27, 2005, at 5:04 AM, Piet van Oostrum wrote:

>>>>>> Aaron Jackson <jackson at msrce.howard.edu> (AJ) wrote:
>
>> AJ> To be more exact, in general the tar command should be:
>
>> AJ> tar cfz - ./local | ssh machine 'cd <target dir>; tar xpfz -'
>
>> AJ> note the ``p'' in the second tar preserves the owner and group 
>> information
>> AJ> along with the file modes, which might be critical depending on 
>> who owns
>> AJ> the files.  Not including it has bitten be in the past.  One 
>> additional
>> AJ> problem is that both machines need to have the same user owner 
>> and group
>> AJ> id's.
>
> Man tar says about the extract operation:
>     The owner, modification time, and file permissions are restored, if
>     possible.
> Group is also restored although this isn't explicitely stated. So I
> think -p doesn't add anything. But it shouldn't harm either.

Yes, but you have to keep in mind that tar on OSX is GNU tar, therefore 
it is not standard.  You cannot depend on these non standard behaviors 
on other unix systems.

>
> But when copying system files, like /usr/local, the extract operation
> should run as root, otherwise the owner is not restored. One way to do 
> this
> is to use sudo at the ssh side.
>
> tar cfz - ./local | ssh machine 'cd <target dir>; sudo tar xpfz -'

Again, this is a OSX specific way to do things, since sudo is not a 
standard unix utility and you cannot expect it to be on all unix 
systems.  A more general solution would be:

tar cfz - ./local | ssh -l root machine 'cd <target dir>; tar xpfz -'

Which was my point in the first place, to make the suggested command 
general to any unix system.


------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/




More information about the MacOSX-TeX mailing list