copying pointed to links
Leaw, Chern Jian
chern.jian.leaw at intel.com
Thu Nov 20 19:00:27 EST 2003
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?
More information about the rsync