Create the parent directory at wherever you want.
mkdir /where/ever/you/want
Example: mkdir /app01/data
switch to the directory from where you want to copy the directory structure.
cd /from/where/you/want/to/copy/directory/structure
Example: cd /app02/data
Now type the following command in the server terminal
find * -type d -exec mkdir /where/you/want/\{\} \;
Example: find * -type d -exec mkdir /app01/data/\{\} \;
Now the directory structure create in the new path where you specified as it is in the source.
5 comments
Write commentsIt's a smart way. Thanks.
ReplyThanks for comment :)
ReplyNice one
ReplyIt does copy contents of the directories.
Replydoes not --preserve associated information
ReplyWhat do you think about this Article? Add your Opinion..! EmoticonEmoticon