Skip to content

Instantly share code, notes, and snippets.

@johnniehard
Last active December 10, 2022 07:45
Show Gist options
  • Save johnniehard/68ef5621054c6a817097e66899482508 to your computer and use it in GitHub Desktop.
Save johnniehard/68ef5621054c6a817097e66899482508 to your computer and use it in GitHub Desktop.
I wanted to copy all of the .wav files from a wierdly nested directory structure into a flat folder. The filenames unfortunately had lots of spaces and single quotes in them. This is what ended up working.
#! /bin/bash
find . -name '*.wav' -print0 | xargs -I{} --null cp -u {} ../target_folder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment