I have a car stereo that won't play all my mp3s (5k files totalling >32GB). There's probably some sort of parsing or filesystem problem but I can't figure it out (there's no debugging output I can find and I seem to be within the formatting restrictions specified by the user manual) so it only plays artists roughly [0-9A-C].*
and some of D.*
.
I just want to play all my music on "random all" so the next thing I'm willing to try is to pick some random subset of my music and copy that to a USB stick, and repeat that procedure every week or month or so. I could do something "simple" like
rm -rf /media/foo/*; find . -type f | shuf | head -1000 | while read line; do mkdir -p /media/foo/"${line%/*}"; rsync -av "$line" /media/foo/"$line"; donebut I'd prefer something a little more user-friendly since it won't be me running this command, and of course it would be nice if files that are kept between runs don't have to be deleted then re-copied (my first run with that command took 17 minutes). Is there some better tool or process?
(Incidentally, if you know of an off-the-shelf system that plays oggs, especially one I can buy from a retailer like Crutchfield with an adapter kit for my car, I'd be very interested.)
while..read
is prolly making it 200 times slower than other solutions that wouldn't use that infamous loop. If you have sane file names you could just save them into a text file and then simply useshuf -n 1000 mytextfile
to get 1000 random file names that you could then copy to your flash drive with e.g.rsync
. You just have to update the text file when you add files to your mp3 collection. – don_crissti Apr 20 '16 at 21:22