Linux – Create new empty directory tree from existing tree with files

command linelinuxshell

I have a large directory tree with lots of files.

I would like to re-create the directory structure in a new location, but only the directories, not the files.

I've checked cp's man page, but don't see an argument that will help.

Best Answer

rsync -av -f"+ */" -f"- *" /.../SOURCE /.../DESTINATION