How to find similare or duplicate files from Linux/Unix

Most of us forgot what we stored in USB disk or in local disk and that’s hard find how many duplicate files/folders stored under disk. I came to know that we have option to find the duplicate files from disk using fdupes command utility. Lets see how we can use it.

In Redhat/Fedora/CentOS

#yum install fdupes 

In Debain/Ubuntu

#apt-get install fdupes

Once installed you can use right away to find duplicates..

To find duplicates in a folder

#fdupes /path/to/folder

This will find all the duplicate files in that folder. What about if you want to find in sub folders too?

Use -r option to recursive search..

#fdupes -r /path/to/folder

but this will not show what is the size of that duped files? Then there is any option to find sizes too? Yes you can use -S to find sizes too..

#fdupes -S -r /path/to/folder

What about deleting them with a conformation so that you no need to go into every folder and delete them.

#fdupes -d -r /path/to/folder

Sample output

#fdupes -d -S -r /media/Movies/
Leave a Comment