I'm sure there has to be a way to do this, but I'm not sure if it is rm or not.
I keep my music on my Mac's hard drive, formatted HFS+. I'm about to go overseas, and I am not taking my Mac with me, so I copied all the music to an external drive, so that I can "loan" it to people who have computers or mp3 players. The directory tree of this drive is organized into folders by artist, then by album within the artist folder.
Sometimes, OSX will create what are probably indexing files throughout the directory tree. So if I have the file "O8 Firestarter.m4a", it might produce the file "._08_Firestarter.m4a". These files are always less than 1KB. OSX, as far as the user is concerned, ignores them completely. A Linux machine, for all intents and purposes, will ignore them too. But a Windows machine will see these files and try to add them to playlists, or some other nonsense. Deleting these files doesn't affect disk or file operations in Linux or OSX. So it would be best to delete them before needlessly confusing those unfortunate enough to be using Windows (they're already confused!).
So the question is, how can I recursively delete all these file via my Linux computer? Matching the pattern of "._*.m4a" is easy enough. But there doesn't seem to be a way for rm to cruise through each directory and delete the files. Probably a perl or shell script would do it, and I may just end up writing one. But is there a built-in command that will handle this? A one-liner that goes through and does the whole tree in one swoop would be ideal.
Bonus points to anyone who knows what album the track listed above is from.


