need a duplicate mp3 file finder

Is there a program for linux which can show me a list of all duplicate music files in a directory? This will allow me to delete all duplicate files without searching for them manually. The more advanced the better;).

Duplicate by tag info, or just file name? In other words, if you have a VanHalen-Jump.mp3 and Track01.ogg file with the same song…?

there are several duplicate file finders available…any should
do…if you just wanna check the mp3s you would just read the
documentation to see how to restrict it to certain directories or file

462 hits at

i can’t recommend any particular one over another (have never used any
of them)


There was a similar thread about finding duplicate images here: Tool to find duplicate images? - openSUSE Forums. Maybe this can help.

To me it seems you are looking for an Iron Monk listening to all your music files and taking notes of what he heard. lol!

if you’re just looking for duplicate files (and not for similar contents), a simple shell script like that one could do it, provided you don’t use “@” in filenames!

#! /bin/bash
# recursively find duplicate files (same size and same md5sum), optionaly with the given extension


if [ "x$*" == "x" ] ; then
        exec echo "syntax : $0 directory [extension]"
elif [ ! -d $dir ] ; then
        exec echo "directory $dir not found"
elif [ "x$2" == "x" ] ; then
        allfiles=(`find $1 -type f -ls | awk '{ print $7"@"$11 }' | sort -n`)
        allfiles=(`find $1 -type f -name "*.$2" -ls | awk '{ print $7"@"$11 }' | sort -n`)


while [ $i -lt  ${#allfiles[li]}  ] ; do
[/li]        j=$(($i+1))
        if [ $j -lt ${#allfiles[li]} ] ; then
[/li]                e1=${allfiles[$i]} ; e2=${allfiles[$j]}
                f1=${e1##*@} ; f2=${e2##*@}
                s1=${e1%%@*} ; s2=${e2%%@*}
                if [ $s1 -eq $s2 ] ; then
                        m1=`md5sum $f1 | awk '{ print $1}'`
                        m2=`md5sum $f2 | awk '{ print $1}'`
                        echo "$f1 = $f2" 
        let i++

Thx for the help, but the anwsers don’t quite fit the bill. Maybe I should have been more specific;). I have a large collection (7000 mp3s) which contains duplicates no doubt. The problem is that chances are slim that these duplicates have the same filename, or even the same file size (eg bitrate 128 vs bitrate 320).

I need something that looks at the mp3 tags: if artist and title are the same: they are duplicates. I now that iTunes has an option to give me a list of all duplicates. But I do not want to install windows just for that reason. I looked if amarok could to this, but it only allows me to remove all duplicates in a playlist. I need the opposite: remove all non-duplicates;).

There are several python scripts to display and manipulate mp3 tags.

zypper in python-eyeD3

But how will this help finding the duplicates? It seems that with this program I would have to do it manually. For this amarok would suffice, but it is just to much work since I have too many mp3’s. I find it hard to believe no decent tool for linux exists. And yet I haven’t find one:(.

Assuming your files are in /data/music (and subdirectories), you can use a command line like the following one to write a list where file names, size, mp3 title and author would appear on the same line ( = one line per file ). Then, it should not be too difficult to parse the list ( which get written in the file /data/music/mp3.list in the example below), sort the files and remove duplicates.
**find /data/music -type f -name “*.mp3” | xargs eyeD3 --no-color | grep -e ‘.mp3’ -e ‘title’ | sed ‘s/^title/=&/’ | sed -e :a -e ‘$!N;s/
=/ /;ta’ -e ‘P;D’ > /data/music/mp3.list
But I known that’s not what you’re looking for. :frowning:

It seems your command does not support filenames with spaces:
if a file is found: “this is musicfile.mp3”

it gives errors:

File not found: this
File not found: is
File not found: musicfile.mp3

I’m starting to give up hope. Still can’t believe a music player like amarok doesn’t support this. iTunes has this probably for years…

That one should work with spaces in filenames:

find /data/music -type f -name “*.mp3” -print0 | xargs -0 eyeD3 --no-color | grep -e ‘.mp3’ -e ‘title’ | sed ‘s/^title/=&/’ | sed -e :a -e ‘$!N;s/
=/ /;ta’ -e ‘P;D’ > /data/music/mp3.list

However using spaces in filenames is not a good idea.

iTunes has this probably for years…

What about songbird ? I think iTunes fans use songbird on Linux. It cannot be worse than Amarok anyway.

I’m not the biggest iTunes fan, I really love amarok;). But it does seem that songbird has an addon to find duplicate files. I’ll give it a try when I have the time. Thx!

Update: songbird solved the problem:). I downloaded the exorcist add-on and adapted the clones.js file with this:

var str = item.getProperty(SBProperties.artistName) + '|' +
			//item.getProperty(SBProperties.albumName) + '|' +
			item.getProperty(SBProperties.trackName);// + '|' +
			//item.getProperty(SBProperties.genre) + '|' +
			//item.getProperty(SBProperties.contentLength) + '|' +

It then shows me a list of all files with identical artist and title. This gives me a total of 800 files, thus 400 duplicates. By default the line item.getProperty(SBProperties.albumName) was uncommented and then only 26 files were given!!

There are some Tools to find duplicate music files. I need a duplicate file finder to delete duplicate files from drives, I used the programme duplicate finder 2009 for such aim. It helped me. This program is for all files. And now it is more free place on my PC :slight_smile:

Find Here : Find Duplicate Files - Delete Duplicate Pictures, Songs, Videos and Movies

Try Duplicate Finder from Ashisoft,

Duplicate File Finder - Find and remove duplicate files, byte by byte/crc32

This software worked for me -

Yes, there is a program available named xxxxxxxxxxc is the best one you can opt for. This tool is especially meant to search and remove all the mp3 duplicate files existing on the system and thus frees up the extra space consumed by the hard disk resulting to slow performance issues.

you can use dddddddddddddd

Duplicate Finder is the best solution in this case. It will help you to search and delete duplicate images, photo and mp3 files. The file names can also be different.
Duplicate Finder

I am very skeptical about your post Antony09. Since this is an OpenSuse forum and the software you link to is for some closed source windows software…