Making M3u playlist in Linux console (shell)

I have decided to work for a while in pure text-mode and not using GUI.

Therefore, I use virtual terminal in my Ubuntu 11.10 (Oneiric Ocelot) which accessible easily with pressing ‘CTRL+ALT+F(X)’, X could be 1 to 6.

If you press ‘CTRL+ALT+F7’ you will back to GUI again.

To make it short, I wanted to make a playlist (.m3u) to play my favorite songs in Mpg123 player.

At first it looked though but after thinking I found a solution. To be exact I use the following commands.

$ cd /home/kixz/Music

$ pwd >> playlist.m3u

$ ls >> playlist.m3u

$ nano playlist.m3u

Then I edit the playlist and add the path before each file name.

Description of procedure.

1- I put the current path (which is my Music folder) to a file (playlist.m3u). Generally, m3u file is text file and you can open it with text editor.

2- I redirect the file names to playlist file.

3- Finally, I edit the file and remove the file names which I do not want to listen and add the path before the names of songs which I want to listen.

Easy, right ??!

send your idea to kasra.madadipouya@geeksweb.tk

Leave a Reply