Archive for the ‘Music’ Category

How to rename files in a directory to lowercase

2009-09-05

Ever want to take a massive tree of files and rename them all lowercase? (Ever work between case-sensitive and case-insensitive systems? :\) Here’s my first attempt:


find . -type f -and -not -type d -print0 | xargs -0 -n 1 echo | while read line; do target=$(echo $line | tr A-Z a-z); echo mv \"$line\" \"$target\"; done | less

which looks fine, until you realize that the path is made lowercase too, despite only looking at files. So I googled, and found a StackOverflow page: http://stackoverflow.com/questions/152514/how-to-rename-all-folders-and-files-to-lowercase-on-linux with this bit:


for SRC in `find my_root_dir -depth`
do
DST=`dirname "${SRC}"`/`basename "${SRC}" | tr '[A-Z]' '[a-z]'`
if [ "${SRC}" != "${DST}" ]
then
[ ! -e "${DST}" ] && mv -T "${SRC}" "${DST}" || echo "${SRC} was not renamed"
fi
done

which isn’t careful about spaces in the filename. But otherwise, it’s on to something with dirname and basename. Revisit mine!


find . -type f -and -not -type d -print0 | xargs -0 -n 1 echo | while read line; do target=$(basename "$line" | tr A-Z a-z); target=$(dirname "$line")/$target; mv "$line" "$target"; done

Animal Collective – Take Away Show

2008-08-03

I saw [this](http://www.blogotheque.net/Animal-Collective,3881) a while ago, and it’s pretty great if you like Animal Collective. Sorry I didn’t share earlier.

Did it start yet?

2008-07-29

Allegedly I [know](http://wiki.secondlife.com/wiki/Unicode_In_5_Minutes) my [unicode](http://www.pauloppenheim.com/blog/2008/05/14/the-fog-of-war-mcnamara-and-spidery-ha/) but I still get rad surprises:

䷂ – U+4DC2 HEXAGRAM FOR DIFFICULTY AT THE BEGINNING

[bad start](http://www.last.fm/music/Mr.+Oizo/_/Bad+Start).

All a mess!

2008-07-26

I was just upgrading WordPress and noticed I haven’t said much in a *while*! Not for lack of anything going on, but it’s mostly been personal stuff and work stuff. Seeing as this is already a meta post, I’ll summarize for those following my stream that care (hello, facebook).

(more…)

chew on para one

2008-04-30

[just because](http://www.youtube.com/watch?v=jI9lYeAh-3A).

Ego Surfing Gratification

2008-04-16

So I was just [ego surfing](http://en.wikipedia.org/wiki/Egosurfing) and found [a song written by Niko Donburi that has a line about my work persona, Poppy Linden](http://niko-mysecondlife.blogspot.com/2007/12/public-thank-you-to-ll.html). Woot! Here’s the song…

(more…)

Yellow Drum Robot

2008-03-30

You just need to see [this](http://letsmakerobots.com/node/112).

rsync – i bet you think it’s working for you

2008-01-10

Hey folks! If you’re a unix nerd like me, you probably use rsync for everything. Unfortunately I learned today that if you do `rsync -vaP –delete source dest` you may not have sync’d files. Why? Because that only uses the timestamp.

Yeah.

Anyhow, `rsync -c` is what you want. This does a checksum everytime regardless of timestamp. A word of caution though: it takes *forever*. However, my 80GB cache of corrupted MP3s are thanking me.

Everyone Else Has Had More Sex Than Me

2007-10-21

Ok, I’m on a youtube binge with no real content lately, but I’m sick. Incapable of any real thought, I bring you this:

(Or at (http://youtube.com/watch?v=X_U2yG3uZp0)). Which I saw courtesy of [Channel Frederator](http://frederatorblogs.com/channel_frederator), which I got from [Miro](http://www.getmiro.com/), a sweet internet video channel program that is making my dusty old TV more useful.

Groovy Dancing Girl – Sophie Merry

2007-10-04

Wow, youtube. You can get lost for hours. However, you find gems like this:

Yeah. Also…

(more…)