copying a directory and preserving links?
I'm trying to copy an entire directory structure and preserve any links. What would the correct syntax be?
cp -rp *.* /dev/hdb2? or is there a better way? Thanks |
The most reliable way I know, that works on most Unix OS (and Cygwin as well) is:
Code:
# (cd /source/dir && tar cf - .) | (cd /destination/dir && tar xpf -) Else: Code:
# (cd /parent/of/source/dir && tar cf - dir/) | (cd /parent/of/destination/dir && tar xpf -) Yves. |
All times are GMT -5. The time now is 07:56 AM. |