Find Duplicate files in multiple disks

Hello I am looking for an application (better kde one) that can search two external hard disks I have and find any duplicate files. I did some backups before to one disk which i copied few years ago to the other disk. Right now I would like some program to check files and tell me if there are the same.

I would like to thank you in advance for your help

Regards
Alex

I don’t know about guis, but here’s something that should work from the console (untested):

change these two paths to point to your mount points

MYDISK1=/media/something
MYDISK2=/media/somethingelse

TMP1=/tmp/blablabla123142-disk1.tmp
TMP2=/tmp/blablabla123142-disk2.tmp
TMP3=/tmp/blablabla123142-hashes.tmp

find “$MYDISK1” -type f -exec md5sum {} + > “$TMP1”
find “$MYDISK2” -type f -exec md5sum {} + > “$TMP2”
sort “$TMP1” “$TMP2” | uniq -d -w 32 | awk ‘{print $1}’ > “$TMP3”

this will print all the duplicate files

grep -F -f “$TMP3” “$TMP1” “$TMP2”

if you want to delete them add the following to the grep line: | awk ‘{$1=“”; print $0}’ | xargs rm -i

making it

#grep -F -f “$TMP3” “$TMP1” “$TMP2” | awk ‘{$1=“”; print $0}’ | xargs rm -i

remove the -i if you don’t want to be asked about each file

rm “$TMP3” “$TMP1” “$TMP2”

a gui please i am really bad with konsole

That would take for ever. You should list all the files, sort by size and checksum only the files which have the same size (and/or the same name, depending on what you’re looking for).

I didn’t say it was fast, but it should get the job done. Since the OP didn’t specify exactly what he wants to do, maybe a rsync is enough.

No, he does not what to sync, but check for dublicates.

I recommend ‘dupf’, which is a very easy, yet effective console-tool which also can be used with a GUI. The package is called ‘dupfinder’ and is offered via Packman. In case you cannot find it in the menu, you can start it with

dupfgui

rsync doesn’t necessarily sync, but you found something simpler anyway.


Thanks a lot for that.
I am trying it right now

I tried the program and it works! I would still your help with one more thing.
I have two folders that are quite alike. Both have roughly 900+ files and only 20 of these 900 files are NOT duplicates. The program finds succseefully all the duplicates but I want to find the non-duplicated files.

CAn you help me do that with the program u suggested?
Regards

If the directories you want to compare don’t include subdirectories - or you don’t need to compare recursively - , you can use a two pane file manager, such as Midnight Commander (mc) in a terminal or the GUI program krusader. In krusader, with one directory in each pane, you would do <Edit-Compare Directories> and then <Edit - Invert Selection>.

thanks a lot but they do include a lot of subfolders. :frowning:

Thank you very much for your code! Actually the two folders I would like to compare are quite alike they have the same size 9.1 Gb/9.11Gb an they seem to differ ONLY in 30-40 files.
So it would be great to find out only the files that ARE NOT the same (find the non-duplicates). If I got it right from you code you only check for similar file names. What if two files have same filenames but different size? Are you handling this case?

I would like to thank you in advance for your help

Best Regards
Alex

IF someone can help me change this line lynxlynxlynx suggested before

this will print all the duplicate files

grep -F -f “$TMP3” “$TMP1” “$TMP2”

to find not what is duplicate but what is not then I have answer to my questions.

Regards
Alex

Try this, it will definitely solve your problem: Duplicate Files Deleter

Hi Alex,
I’ve recently found a software “Duplicate Files Deleter”, and it can help you with this. Check Duplicate Files Deleter - tool for finding and deleting duplicate files, delete duplicate files | duplicate files | find duplicate files , download it and you can find and delete duplicate files safely. There is a video to explain the process. Pretty nice solution.

joshuarobers wrote:
> alaios;2276737 Wrote:
>> Hello I am looking for an application (better kde one) that can search
>> two external hard disks I have and find any duplicate files. I did some
>> backups before to one disk which i copied few years ago to the other
>> disk. Right now I would like some program to check files and tell me if
>> there are the same.

rsync can probably do that for you

>> I would like to thank you in advance for your help
>>
>>
>> Regards
>> Alex
>
> Hi Alex,
> I’ve recently found a software “Duplicate Files Deleter”, and it can
> help you with this. Check ‘Duplicate Files Deleter - tool for finding
> and deleting duplicate files, delete duplicate files | duplicate files |
> find duplicate files’ (http://DuplicateFilesDeleter.com//) , download it
> and you can find and delete duplicate files safely. There is a video to
> explain the process. Pretty nice solution.

Or you might prefer a free, open-source program: faster-dupemerge

http://www.hungrycats.org/~zblaxell/projects/dupemerge/dupemerge.html

It’s reasonably well-known and works for me.

I highly recommend to use duplicate files deleter. Here’s the link: Duplicate Files Deleter - tool for finding and deleting duplicate files, delete duplicate files | duplicate files | find duplicate files

AnnaLorf wrote:
> I highly recommend to use duplicate files deleter. Here’s the link:
> ‘Duplicate spam Files spam Deleter - tool for finding and deleting duplicate
> files, delete duplicate files | duplicate files | find duplicate files’
> (http://www.some-spam-domain.com)

I think this is spam posted by a brand-new poster, just as the previous
post recommending this software was. I suggest moderators delete these
posts.

Hi,

You can try Duplicate Filter from http://www.duplicatefilter.com, which can fully meet your needs. It is one of the best tools available for finding duplicate files and folders in multiple hard disks, and is fast and easy-to-use!

i am using “DuplicateFilesDeleter”. Its so awesome to find duplicate files on your system and delets the. its so easy and user friendly software.