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

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

The Pumpkin Talks Back
Nov 6: I gave my flaming jack-o'-lantern a voice, a camera, and a personality, and let it insult trick-or-treaters for six hours.
A Skills Wheel for Product Designers
Oct 18: I love Petra Wille's PM Wheel for product managers. I couldn't find an equivalent for designers, so I built one.
Where Does Product Marketing Belong?
Mar 6: The debate about whether PMM reports to product or marketing has a simple answer once you ask the right question.
The Rise of Vertical Software
Feb 15: AI makes execution cheap. Deep industry knowledge becomes the real moat.
Using Chatbots as a Tutor
Feb 11: A prompt that turns your LLM chatbot into a custom tutor.
How to Interview Product Managers
Nov 9: Most people never learned to interview, so when thrust into hiring a product manager they ask bad questions. Here's how to ask better ones, with lots of examples of real questions.
AI as Your Strategic Thinking Partner
Oct 12: AI becomes a lens on your own logic. It doesn’t replace your judgment—it sharpens it. By asking questions you wouldn’t think to ask yourself, it turns private reasoning into something visible and testable.
Your OKR Cascade is Breaking Your Strategy
Aug 1: Most companies cascade OKRs down their org chart thinking it creates alignment. Instead, it fragments strategy and marginalizes supporting teams. Here's what works better than the waterfall approach.

Older...

What I'm Reading