[TAG] 2-cent tip: Summing up file sizes

Rick Moen rick at linuxmafia.com
Fri Jul 13 00:42:20 MSD 2007


Quoting Ben Okopnik (ben at linuxgazette.net):

> I just got an iPod Shuffle, and am about to load it up with my favorite
> tunes; however, I didn't want to dink around with multiple reloads of
> the song list if it was too big. Since flash devices only have so many
> write cycles before they starting losing their little brains, minimizing
> writes is a Good Thing. So, I needed to figure out the total size of the
> files in my M3U playlist - and given the kind of questions that often
> come up in my shell scripting classes and on LG's Answer Gang lists, I
> thought that our readers would find some of these techniques (as well as
> the script itself) useful. Herewith, the "m3u_size" script.  Enjoy!

Don't forget to mount using noatime, for reasons explained in my second
favourite Linux magazine:  http://www.linuxjournal.com/article/6867

-- 
Cheers,      "Transported to a surreal landscape, a young girl kills the first
Rick Moen     woman she meets, and then teams up with three complete strangers
rick at linuxmafia.com       to kill again."  -- Rick Polito's That TV Guy column,
              describing the movie _The Wizard of Oz_




More information about the TAG mailing list