I want to apply replaygain information to all the MP3 files in my music collection. To do this, I'm using a tool called mp3gain (on Linux).
In order to apply the album gain correctly, I need to run the mp3gain command on a per directory basis. In other words, I need to find a directory, run mp3gain on all files in that directory, then repeat for every other directory. So far, I've come up with this:
find . -type d -exec mp3gain {}/*.mp3 \;
The output looks like this (only showing a couple of the many directories):
[...]
./dev2/Physicist/*.mp3
Can't open ./dev2/Physicist/*.mp3 for reading
./Real Things/*.mp3
Can't open ./Real Things/*.mp3 for reading
It appears to me that the '*
' is being escaped, so rather than looking for all files ending in '.mp3', it is looking for a file called '*
.mp3'.
What command should I use?