Wednesday, August 31, 2011

Bash: copy directory structure without the files

Here's a one-liner to do that. Go to the source directory and say

user@host:source$ find * -type d -exec mkdir destination/\{\} \;

No comments:

Post a Comment