/dup-detect

detect duplicate files in a directory

Primary LanguageHaskellBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

dup-detect

Is a binary tool to show duplicate files in a given directory.

How to build and run

  1. get stack building tool install link
  2. cd dup-detect
  3. stack run your/directory/full/of/duplicates [extension] i.e: stack run ~/Downloads .jpg
  4. the duplicates if any will be displayed in console with a prompt to select which one to keep.

How does it work?

It lists all files inside directory and if it detects that a given size occurs more than once it does check with SHA256 if files with same size contain duplicates.

References

I get the idea from this repo originally: dup_files_detector with a Go implementation. I enjoyed creating a Haskell implementation with some optimisations ;)