> 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 Album: Year: Comment: 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??
Old drive with lots of music or unsorted drive? This command will play all mp3 files in a folder and after playing one song or pressing q, it will ask you if you want to delete the file.
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.
commandlinefu.com 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.
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.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
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: