Music players on Linux – the poor mans random song player.

2012-07-20 177 words 1 min read

If you have more applications running on your system then your system can handle them then you know what I mean when I say that the Music Players take a lot of CPU. Otherwise harmless, but when you are doing too many things, then lot of times you would feel that probably stopping the Music player might help. But then Linux is all about alternatives. So, there is a command line player called mpg123, which does not use so much CPU. But what about playlist 🙂

playlist="/tmp/playlist"
(find . -type f |sort -R) > $playlist
trap exit INT TERM EXIT 1 2 3 15
while read line
do
    mpg123 "$line"
done < $playlist

Just copy this to somewhere as .sh file or just type this in your directory of choice and it will play all the music in that folder in random order without hogging your CPU.

Enhanced by Zemanta

author

Authored By Amit Agarwal

Amit Agarwal, Linux and Photography are my hobbies.Creative Commons Attribution 4.0 International License.

We notice you're using an adblocker. If you like our webite please keep us running by whitelisting this site in your ad blocker. We’re serving quality, related ads only. Thank you!

I've whitelisted your website.

Not now
This website uses cookies to ensure you get the best experience on our website. Learn more Got it