Last active
August 29, 2015 14:06
-
-
Save surrealroad/43348a1453ed09d242ba to your computer and use it in GitHub Desktop.
Duplicate files & folders without content
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://stackoverflow.com/a/25847006/262455 | |
# If there are only directories and regular files, you can do something like this: | |
cd "$src" | |
find . -type d -print0 | ( cd "$dst" ; xargs -0 mkdir -p ) | |
find . -type f -print0 | ( cd "$dst" ; xargs -0 touch ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment