I have a largish music collection and there are some duplicates in there. Is there any way to find duplicate files. At a minimum by doing a hash and seeing if two files have the same hash.
Bonus points for also finding files with the same name apart from the extension - I think I have some songs with both mp3 and ogg format versions.
I'm happy using the command line if that is the easiest way.
I use
fdupes
for this. It is a commandline program which can be installed from the repositories withsudo apt install fdupes
. You can call it likefdupes -r /dir/ect/ory
and it will print out a list of dupes. fdupes has also a README on GitHub and a Wikipedia article, which lists some more programs.List of
programs/scripts/bash-solutions
, that can find duplicates and run undernix
:rmlint-gui
package with GUI (may be launched byrmlint --gui
or from desktop launcher named Shredder Duplicate Finder)FSlint has a GUI and some other features. The explanation of the duplicate checking algorithm from their FAQ:
fslint installation instructions
If your deduplication task is music related, first run the picard application to correctly identify and tag your music (so that you find duplicate .mp3/.ogg files even if their names are incorrect). Note that picard is also available as an Ubuntu package.
That done, based on the
musicip_puid
tag you can easily find all your duplicate songs.Another script that does this job is rmdupe. From the author's page:
I use komparator -
sudo apt-get install komparator
(Ubuntu 10.04+ ) - as GUI-tool for finding duplicates in manual mode.For Music related duplicate identification and deletion Picard and Jaikoz by http://musicbrainz.org/ is the best solution. Jaikoz I believe automatically tags your music based on the data of the song file. You don't even need the name of the song for it to identify the song and assign all meta data to it. Although the free version can tag only a limited number of songs in one run, but you can run it as many times as you want.
Have you tried
or
I guess it works fine.
dupeGuru has a dedicated mode for music. It is a cross-platform GUI program and, as of today (February 2021), it is in active development, although it is unclear which releases work on which systems. Check its documentation.