LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-16-2006, 01:10 PM   #1
fakie_flip
Senior Member
 
Registered: Feb 2005
Location: San Antonio, Texas
Distribution: Gentoo Hardened using OpenRC not Systemd
Posts: 1,495

Rep: Reputation: 85
checking for duplicates


When I do "slocate mp3", I get a lot of output. I think I have duplicate mp3s that have been copied on my computer. How can I use that output to see if the same mp3 is on my computer twice without going through all of it trying to figure out myself? Thanks.
 
Old 09-16-2006, 01:26 PM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Try something like this:
Code:
find / -iname '*.mp3' -exec basename {} \; | sort | uniq -d
 
Old 09-16-2006, 01:34 PM   #3
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Or, if slocate has to be used:

slocate .mp3 | xargs -i basename {} | sort | uniq -d
 
  


Reply



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
finding and listing mp3 duplicates ronanio Linux - Software 1 07-26-2006 10:10 AM
Woe is he who duplicates mac addresses... danimalz Linux - Hardware 1 01-12-2006 08:54 AM
Comparing 2 Files for Duplicates Mr_H Linux - Newbie 5 11-09-2005 12:43 PM
how could I delete duplicates entries in xml using php catzilla Programming 2 10-30-2005 07:08 PM
MySQL: How-to Surgically Remove Duplicates mchirico LinuxQuestions.org Member Success Stories 0 06-11-2004 10:53 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:28 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