Question Hello,
I am trying to duplicate certain small portions of a disk which includes directories, files and soft-links. But when I use "cp [options]" it seems that the soft-link target is copied rather than the soft-link as it is. Is there some switch (or some other way) to copy a small directory structure such that the soft-links will be retained?
What I would like is a mirror image.
Thanks in advance.
Answer Hi!
The easiest way to copy something like that is to use tar.
Lets say you want to copy dir1 to dir2 (with symlinks and all):