Dupsfinder is a duplicate file finder program which can search recursively through directories, disk drives and any other storage devices.
- To compile: make dupsfinder
- To execute: ./dupsfinder <directory list> <options>
- -h : to get help guide.
- -d : to delete the duplicate files and retains the first file of each group.
- Ryzen 5 2500U @2 Ghz(base) and 3.6 Ghz(boost), 4 cores
- 8 GB DDR4 Ram
- 1 TB 5400 RPM HDD of western digital
-
First run, time
- Real: 18 secs
- CPU: 2.1 sec
-
Average of 10 test consecutive tests
- Real: 0.823 secs
- CPU: 0.8098
-
First run, time
- Real: 51 secs
- CPU: 6.5 secs
-
Average of 10 consecutive tests
- Real: 3.7 secs
- CPU: 3.6 secs
-
First run, time
- Real: 4 min 30 secs
- CPU: 15 secs
-
Average of 10 consecutive tests
- Real: 4 min 13 secs
- CPU: 15 secs
- Loads files into hashtable on the basis of their sizes.
- Compare every file to every other file on a same bucket at a time as follows
- Compare their sizes.
- If matched, compare their xxhash of first 2KB.
- If matched, compare their sha256 hash.
- If matched, push duplicate files to stack.
- Print duplicate files by traversing stack.
- If delete flag is used then pop files from stack and also delete them but leaving parent files.
- Before exiting free all sorts of allocated memory.