This problem frequently
occurs. There is a machine
with a complex directory
structure, and you want to
have a copy of this directory
tree on another machine.
It is for testing purposes
(for example), and you want
to copy permissions,
UID/GID, and the directory
tree but don't want to copy
user files.
Here is the fastest
solution:
machine_a # cd /mydir
machine_a # find . -depth -print | cpio -o -O /tmp/dir.cpio
This tip generously supported by: paul@dataware.hu
NOTE: All tips provided are USE AT YOUR OWN RISK. Tips are submitted
by various unix admins around the globe. UGU suggest you read and
test each tip in a non-volitile environment before placing into
production.