That reads as "how do I copy files without copying files?" It's like a Zen koan.
Are you asking how to copy a directory without copying individual files?
See the -p and -R options for cp(1), but I prefer net/rsync with -a and maybe -H, depending: # rsync -a base/ base1/
I want to replicate the hierarchy only without the files inside. Something similar to:
[CMD=""]install -d base1/d0/d1/d2[/CMD]
but preserving permissions and ownership from base0.
Yes, you can script it using find -type d -ls to get the directory tree, permissions, and ownership. Then pass that into xargs or whatever to re-create the tree and set ownsership/permissions.
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.