Skip to content

Instantly share code, notes, and snippets.

@jangeador
Created September 1, 2014 13:44
Show Gist options
  • Save jangeador/505c8b8e162845a98f8e to your computer and use it in GitHub Desktop.
Save jangeador/505c8b8e162845a98f8e to your computer and use it in GitHub Desktop.
# Brings all files from subdirectories to the root or to a designated folder
# to move to another folder substitute "." with the destination
# the backup=numbered option keeps files with the same name using a number
find /src/dir -type f -exec mv --backup=numbered -t /dst/dir {} +
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment