Skip to content

Instantly share code, notes, and snippets.

@surrealroad
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save surrealroad/43348a1453ed09d242ba to your computer and use it in GitHub Desktop.
Save surrealroad/43348a1453ed09d242ba to your computer and use it in GitHub Desktop.
Duplicate files & folders without content
# 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