LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-26-2006, 05:39 PM   #1
edgjerp
Member
 
Registered: Dec 2004
Location: Trondheim, Norway
Distribution: kubuntu 10.04
Posts: 308

Rep: Reputation: 31
organizing music


I have quite a few mp3s sorted in folders by artist. some of them are probably marked wrong, and there are likely several doubles. what is the best way to find which files are identical regardless of name? some form of hash list probably, but the directories make it more difficult. Even when outputting md5deep to a file, I do not quite know what to do, what syntax do I use to search for any identical strings? (compare all to all)

It would also be nice to have a second directory tree, sorted by title instead of artist, (preferably just symlinked). Anyone know how to do this quickly? One file at a time is not really an option.
 
Old 11-26-2006, 05:56 PM   #2
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
I'd execute mp5sum on the files, and then use uniq to find those checksums which appear more than once, and grep for them in the original list to show which files those checksums are for. You could do that with a script like this:
Code:
#!/bin/bash

tmp=$(mktemp)
cd /path/to/your/files
find . -type f -print0 |xargs -0 md5sum > "$tmp"
cut -d" " -f1 "$tmp" |sort |uniq -d |while read dupsum; do
    fgrep $dupsum "$tmp"
    echo ""
done
rm -f "$tmp"
 
Old 11-26-2006, 06:06 PM   #3
edgjerp
Member
 
Registered: Dec 2004
Location: Trondheim, Norway
Distribution: kubuntu 10.04
Posts: 308

Original Poster
Rep: Reputation: 31
Thanks, that solves that problem.

Is it possible to make another directory tree sorted by title from the one sorted by artist? (one built with symlinks)
 
Old 11-27-2006, 09:43 AM   #4
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
If the mp3 files have ID3 tags in them with the artist, album etc, you could try tagtool, which I think can do that sort of thing (the tab with the cogs on).

Weirdly this exact topic was discussed on the Lotta Linux Links Podcast this week (show dated Thu, 23 Nov 2006) Dave (the guy who does the podcast) settled on a python program someone posted to him. You might try looking on his site for this, or if you can't find it there, contact him to see if you can get a hold of it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Organizing partitions Ashrack Linux - General 1 09-02-2006 09:07 AM
mp3 organizing doralsoral Linux - Software 1 06-16-2005 04:59 PM
Organizing Internet Research vikasgp Linux - Software 2 05-30-2004 12:10 PM
organizing files endezeichen Linux - General 10 04-13-2004 04:21 PM
organizing my files and directories ryancw Linux - Newbie 1 08-30-2003 10:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration