cp and symbolic links?
Noticed a difference in behaviour between fedora and gentoo using the cp command over symbolic links and hoping someone can explain why...
My /etc/localtime file is a symbolic link back to --> /usr/share/zoneinfo/Australia/Sydney In the two operating systems, I issue a: cp /usr/share/zoneinfo/Australia/Adelaide /etc/localtime FEDORA: The Adelaide file overwrites the localtime file. GENTOO: The Adelaide file overwrites the file that /etc/localtime is pointing to, in this case, /usr/share/zoneinfo/Australia/Sydney becomes a copy of Adelaide. Can anyone explain why and tell me what switches I need that will force an overwrite, deleteing the old symbolic link and writing Sydney as the new /etc/localtime file (no longer being a symbolic link)? |
to see what switches are used (FC) type: alias
and compare to gentoo hope this helps |
Ah........ reveals some info. Thank you.
Fedora has cp as 'cp -i' Gentoo has nothing To me this means the only difference is that Fedora will force you to select (Y/N) to an overwrite. Other than that, the behaviour should not be different. Handy util though. |
i have no experience with gentoo other than watching friends start the compile...
there is a -d switch in 'man cp' which says: Quote:
hope this helps |
All times are GMT -5. The time now is 01:23 AM. |