cp/scp

Gianluca Cecchi gianluca.cecchi at gmail.com
Thu Sep 6 13:32:08 UTC 2007


gnu tar by default preserves symbolic links, afaik.
tried on an fc6 and it is so.
You have to force -h option when you create the archive to tell gnu tar to
archive the file pointed to and not the link itself
Different thing it could be if you create / extract with different versions
of tar (example by AIX to Linux, ecc.)
scp doesn't copy links. For this you can do a sort of

tar zcf - p1 p2 | ssh target "cd target_dir; tar zxf -"

the considerations about gnu tar still are valid, so that if you have to
transfer to/from different flavours of Unix systems, you ought to use find +
cpio as they should be ok overall

sort of

find p1 p2 | cpio -o | gzip | ssh target "cd target_dir; gunzip | cpio
-idmuv"
should preserve link.
then man cpio and man tar run on the arch where you intend to launch the
command is your friend, to see link related options.

HIH and not confuses,
Gianluca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.fedoraproject.org/pipermail/users/attachments/20070906/0734fc89/attachment-0001.html 


More information about the users mailing list