MPlayer:Recursively Play All Files

I've researched this one before and there doesn't seem to be a real standard for how to do this (such as a -r switch for recursive play). Granted, when in Linux is there a standard for something that doesn't really need to be standardized? In Linux land, there's usually a minimum of several ways to do something right. Figuring out newer and more efficient ways of doing things is fun! That said, I'm going to contribute my way of doing this to the mix.

To do this, we are going to need a magical (ooo, shiny) bash one liner that involves a little process substitution (ksh, sh, and csh users, sorry. Those shells don't support process substitution).

What just happened?!
What we just did there was perform process redirection. When you run the find /mnt/music -type..., a process is started up. What the < around the command does is create a link to the output of the pid at /dev/fd/63. A quick ls -l will show us this.

If you want to see the contents of that file, you can simply just run the find command without anything else. If you want to see it in vim like you're editing it, replace mplayer -playlist with vim. This will be like running.

Now, if you realy wanted to get crazy, you could change append to the find command a bit to listen only to music with names that have a 7 in them.

... Or sort our music backwards?

... Or a random sort?!

The last one is kind of pointless since mplayer has a -shuffle switch. I guess you could combine the two and get doubly shuffled music! I think Chef Elzar would have something to say about that. "BAM!!!"