if you want to retain the /ar0402cu/primary part of the path, don't cd into the directory. The -p retains the ownership and datestamp of the files and the R does a recursive copy.
Hi. I would use this command. Do a man on cpio to understand the switches. These commands also retain file mod times, permissions, ownerships and symbolic links I believe.
cd /ar0402cu/primary
find . -depth | cpio -pudm /datamap/secondary/
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.