Need someone to lead product management at your software company? I build high-craft software and the teams that build it. I'm looking for my next opportunity. Check out my resume and get in touch.

This is the blog of Adam Kalsey. Unusual depth and complexity. Rich, full body with a hint of nutty earthiness.

Removing duplicate files in your iTunes library

Freshness Warning
This blog post is over 17 years old. It's possible that the information you read below isn't current and the links no longer work.

One of the problems with a networked drive acting as the iTunes library for multiple computers in the house is that I often end up with duplicate songs in the library. I think this comes from importing the library directory when you also have "Copy files to the iTunes library" set in the iTunes advanced prefs. ITunes imports a song and then tries to copy it over itself. Seeing there’s already a file there by that name it creates a file called "songname 1.mp3"

At least that’s my theory.

To clean up a library full of duplicate files, here’s what I did. I installed Duff, a unix utility that quickly finds duplicate files. Duff works by comparing the actual files of any two files that have identical sizes. I sent Duff’s output to a text file with the command

duff -r /Volumes/music/ > duplicatemusic.txt

Once Duff was done running, I ran a short command to grab all the lines from the output that end in 1.mp3 and delete them.

cat duplicatemusic.txt | grep 1.mp3 | tr '\012' '\000' | xargs -0 rm

If you’ve done whatever it is that causes duplicates a number of times, you might have *2.mp3, *3.mp3, etc. Just run that command again, replacing 1.mp3 with 2.mp3 and so on. The one liner above could probably be improved to grep for any single digit followed by .mp3, but it’s quick enough to run it a few times that I didn’t bother.

Recently Written

Think Systems, not Symptoms
Dec 15: Piecemeal process creation frustrates teams and slows work. Stop patching problems and start solving systems. Adopting a systems thinking approach helps you design processes that are efficient, aligned with goals, and truly add value.
Your Policies Aren’t Your Culture
Dec 13: Policies guide behavior, but culture is the lived norms and values of your team. Policies reflect culture -- they don’t define it. Netflix’s parental leave shift didn’t change its culture of freedom and responsibility. It clarified how to live it.
Lighten Your Process Burden
Dec 7: Everyone hates oppressive processes, but somehow we keep managing to create them.
Product Add-Ons Are An Expansion Myth
Dec 1: Add-ons can enhance your product’s appeal but won’t drive significant market growth. To expand your customer base, focus on developing standalone products.
Protecting your Product Soul when the Same Product meets New People.
Nov 23: Expand into new markets while preserving your product’s core value. Discover how to adapt and grow without losing your product’s soul.
Building the Next Big Thing: A Framework for Your Second Product
Nov 19: You need a first product sooner than you think. Here's a framework for helping you identify a winner.
A Framework for Scaling product teams
Oct 9: The people, processes, and systems that make up a product organization change radically as you go through the stages of a company. This framework will guide that scaling.
My Networked Webcam Setup
Sep 25: A writeup of my network-powered conference call camera setup.

Older...

What I'm Reading