The
locate program can be used with a regex, try:
Code:
rm `locate -r \.m4a$`
Of course you might want to check the output with echo first, like
Code:
echo `locate -r \.m4a$`
to make sure you're not deleting anything by mistake you want to keep. Or you can just use mv instead of rm to move them all to one directory, then examine its contents and if it's all unwanted just delete that.
BTW, those are backticks (the character under your tilda) not quote marks. They evaluate the expression inside and place it literally in the command.