CLI: Create m3u playlist from your music library

Run this command to the directroy of the music you want in your library.
It will list ALL files in EVERY folder, so if you have a really large library, be directory specific.

keith@box ~ $ find /home/keith/Music/Pink-Floyd -type f -name “*mp3” | sort

The output will look like this:

Then, add without quotes " > My-Playlist.m3u " to the end of the previous command

keith@box ~ $ find /home/keith/Music -type f -name “*mp3” | sort > Pink-Floyd.m3u

You will find the new m3u playlist file in your home directory.

You can test it with your music player. I know it works with Audacious,
and if you try it in mplayer, you have to use the -playlist flag.

mplayer -playlist ~/Pink-Floyd.m3u

You can also edit the m3u file with your favorite text editer.

That’s it.