Skip to content

Instantly share code, notes, and snippets.

@AlexBezuska
Created February 20, 2015 16:18
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 AlexBezuska/3180dd26ade437aa0f14 to your computer and use it in GitHub Desktop.
Save AlexBezuska/3180dd26ade437aa0f14 to your computer and use it in GitHub Desktop.
Flatten directory with Gnu CP
if you don't have Gnu copy:
brew install coreutils
Flatten:
Specific file type only
find SOURCE -name '*.mp3' -exec gcp -v --backup=numbered {} DESTINATION \;
All files
find SOURCE -type f -exec gcp -v --backup=numbered {} DESTINATION \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment