Linux copy folder structure without files to a new location

A simple command to copy Directory structure from Linux Machine. Go to the desired folder and run the below command.I t will export the list to a file.

find . -type d > dir.txt

to create the list of directories from this list, run the below command

xargs mkdir -p <  dir.txt

Comments