copying pointed to links
jw at pegasys.ws
Tue Dec 2 20:41:19 EST 2003
On Thu, Nov 20, 2003 at 04:00:27PM +0800, Leaw, Chern Jian wrote:
> I have a filesystem containing a symbolic link.
> pglc0003> ls -l |grep TA
> lrwxrwxrwx 1 cleaw adm 26 Nov 19 17:23 TA -> /pgadm1/adm/cleaw/tempArea
> I'd like to copy the symbolic link TA to the /tmp area, I'd also like to have the directory tempArea from /pgadm1/adm/cleaw/tempArea
> to be updated in /tmp by just copying the symbolic link. During this process, I wish to have the tempArea directory name preserved in the /tmp directory.
> I've tried the following:
> 1) pglc0003> rsync -avzu --copy-links /pgadm1/adm/cleaw/TA /tmp
> However, the /tmp now contains a directory TA, having the contents of /pgadm1/adm/cleaw/tempArea/. Seems that the options used in rsync above did not preserve the original name of the pointed-to filesystem when copied to another file-system.
> 2) pglc0003> rsync -avzlu --copy-links TA /tmp
> building file list ... done
> Method (2) did not work either.
> Is there another method which I could use to preserve the name of the pointed-to filesystem by just copying the name of its symbolic link?
You have the meaning of --copy-links reversed.
Re-read the manpage section for --copy-links and the various
unsafe links bits as well.
J.W. Schultz Pegasystems Technologies
email address: jw at pegasys.ws
Remember Cernan and Schmitt
More information about the rsync