By Alvin Alexander. Last updated: May 17, 2018
I just bought a bunch of MP3 music files from Amazon, and when I downloaded the zip file they provide onto my Mac, it was a bunch of files in a bunch of subdirectories; not really convenient to work with when you’re trying to import them into iTunes. So I used this Unix find
command to move all of the music files from the subdirectories they were scattered in into the root directory that was created when I expanded the zip file:
cd Amazon-Music-Folder find . -type f -exec mv {} . \;
If you ever need to either copy or move a bunch of files with a single command, I hope this example shows the correct find
command syntax for your needs. (If you need to copy the files, use the cp
command instead of the mv
command.)