Skip to content

Instantly share code, notes, and snippets.

@lukesmurray
Created January 11, 2018 05:00
Show Gist options
  • Save lukesmurray/bff51d876f6d3e610a291b864d4a9bd7 to your computer and use it in GitHub Desktop.
Save lukesmurray/bff51d876f6d3e610a291b864d4a9bd7 to your computer and use it in GitHub Desktop.
Copy all the images and videos from a file directory recursively to a single target folder
find . -type f -exec file -I {} + | rg 'video|image' | cut -d':' -f1 | xargs -I '{}' cp '{}' ~/Desktop/target_folder/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment