How to copy directory structure (without copying files)
cd [source]
find [source] -type d -print | sed s/[source]/[destination]/ | xargs mkdir
Substitute [source] and [destination] with the appropriate values, of course.
Explanation:
"-type d" finds all the directories
"-print" prints the directories
"-sed s/[source]/[destination]" substitutes source path with destination path
"xargs" runs a command on each word of input (be careful if your filename contains spaces)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment