Listen and sort your music, with prompt for deleting (minimal alternative version)

for i in *; do mplayer "$i" && rm -i "$i"; done
The glob pattern * expands to all files, no need for the 'ls' command. The quotes around "$i" make sure filenames with spaces in them are handled correctly. mplayer determines if it is a media file and plays it, or gives errors and the loop asks if this file has to be removed.
Sample Output
> for i in *; do mplayer "$i" && rm -i "$i"; done
MPlayer SVN-r35933-snapshot-4.7.2 (C) 2000-2013 MPlayer Team

Playing Eels - A Daisy Through Concrete.mp3.
libavformat version 54.63.104 (internal)
Audio only file format detected.
Clip info:
 Title: A Daisy Through Concrete
 Artist: Eels
 Track: 1
 Genre: Unknown
Load subtitles in ./
Opening audio decoder: [mpg123] MPEG 1.0/2.0/2.5 layers I, II, III
AUDIO: 44100 Hz, 2 ch, s16le, 160.0 kbit/11.34% (ratio: 20000->176400)
Selected audio codec: [mpg123] afm: mpg123 (MPEG 1.0/2.0/2.5 layers I, II, III)
[AO OSS] audio_setup: Can't open audio device /dev/dsp: No such file or directory
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A:   7.8 (07.8) of 146.0 (02:26.0)  0.9% 

Exiting... (Quit)
rm: remove regular file ?Eels - A Daisy Through Concrete.mp3?? 

MPlayer SVN-r35933-snapshot-4.7.2 (C) 2000-2013 MPlayer Team

Playing test.txt.
libavformat version 54.63.104 (internal)

Exiting... (End of file)
rm: remove regular empty file ?test.txt?? 

By: warkruid
2013-12-26 17:13:23

1 Alternatives + Submit Alt

What Others Think

These are indeed the fascinating things about music. Not only that, also provides great ringtones that you can consult and use them for free.
Calantha · 75 weeks and 3 days ago
great , thank you for sharing this . where i usually download sounds, ringtones and can i apply that way.
AlfredMills · 58 weeks and 2 days ago
That's right, it's all great music, you can listen to it every day at klingeltöne mp3 with the best sound quality available today.
LutherFigueroa · 57 weeks and 4 days ago
thanks for sharing, the ringtone and sound of telécharger son gratuit mp3 is completely free.
MeredithAllison · 57 weeks and 4 days ago
Download Ringtone Maker From Google Play & Make Ringtone Of Your Favourite Songs or get ringtones free for your phone
celinaa123 · 47 weeks and 5 days ago
update whatsapp latest version at>fouadmods
CeciliaColeman · 44 weeks and 4 days ago
It sounds like darmowe dzwonki na komórk? do ci?gni?cia and I love it
ErvinPotter123 · 44 weeks and 2 days ago
Or you can use Spotify on to arrange songs
fredrickrhodes · 26 weeks and 3 days ago
In tired times you need to download cool ringtone for nokia, visit here sonnerie Nokia X80 Pro with the best quality available today.
Roykim34 · 24 weeks and 1 day ago
I appreciated your work very thanks
gochi88 · 23 weeks and 1 day ago
Your article is very good, download ringtone to access now
NoraSwanson · 21 weeks and 4 days ago
Thanks for sharing this article. Recently I download minecraft apk from this article.
tyler23lunar · 20 weeks and 5 days ago
Just download the minecraft apk on android smartphone.
tyler23lunar · 20 weeks and 5 days ago
your command audio mp3 is good. I follow command app audio instructions.
arnold · 20 weeks and 5 days ago This is a website that specializes in providing French phone ringtones, synthesizing the best quality music
sonneriesvip · 17 weeks and 4 days ago
With whatsapp plus rojo descargar, you can change the look and feel of the app, as well as add new emojis and other improvements.
ParrisAllan · 3 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this? is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.


Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: