Yes, there is. I don't have it myself at this instance, but either rsync or a find -exec mkdir -p command is where I'd start.
I didn't test this, but ....
Code:
find $TOP_DIRECTORY -type d -exec mkdir -p {} \;
ought to do it. Run it from the directory where you want all the subdirs to be created. Don't expect groups, owners and special permissions to be retained. Might want to include symlinks (or NOT) and other special ACLs too. Don't know your situation.
That should get you started on a workable path.
Update ... that find command may need to be swapped around ... that is run from the source directory to get relative dirs.
Code:
find . -type d -exec mkdir -p $TARGET_DIR/{} \;
Does that make sense?
Bookmarks