Program to Find Duplicate Files in a File System

Given in a directory, we have to write a program to find duplicate files in the file system.
For eg:
Let’s assume we have following files and it’s content in the file system.

char files[][80][80] = {{"1.txt", "abcd"},
                        {"2.txt", "efgh"},
                        {"3.txt", "efgh"},
                        {"4.txt", "abcd"},
                        {"5.txt", "efgh"},
                        {"6.txt", "efgh"},
                        {"7.txt", "xyz"}

Based on above input, duplicate files are – “1.txt” and “4.txt”. “2.txt”, “3.txt”, “5.txt” and “6.txt” are also duplicate files.

(more…)
Program to Find Duplicate Files in a File System Read More