Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sureshsundriyal/dff

A simple duplicate file finder
https://github.com/sureshsundriyal/dff

Last synced: 19 days ago
JSON representation

A simple duplicate file finder

Awesome Lists containing this project

README

        

#+TITLE: dff -- duplicate file finder

[[https://travis-ci.org/sureshsundriyal/dff.svg?branch=master]]

=dff= is a tool for locating duplicate files in a directory. The tool is
modelled after [[http://duff.dreda.org/][Duff]] without any advanced options.

* Building

#+BEGIN_EXAMPLE
cargo build --release
#+END_EXAMPLE

* Installing

#+BEGIN_EXAMPLE
cargo install
#+END_EXAMPLE

* Usage

In any mode of operation:

+ Symlinks are ignored
+ Zero-size files are ignored
+ The specified directories are searched recursively
+ Hard links are not reported as duplicates

** Normal Mode

#+BEGIN_EXAMPLE
dff [dir2 [dir3...]]
#+END_EXAMPLE

In normal mode of operation; =dff= searches through the specified directories
searching for duplicates using the following algorithm:

+ Only compare files if they are of equal sizes.
+ Compare the hashes of the beginning 1024 bytes to check whether
they are equal.

The two checks above quickly pin-point files which might be same.

** Thorough Mode

#+BEGIN_EXAMPLE
dff -t [dir2 [dir3...]]
#+END_EXAMPLE

In =thorough= mode, instead of comparing the hash of first 1024 bytes; hash of
the complete file contents are compared. This greatly reduces the probability
of false positives.

** Exhaustive Mode

#+BEGIN_EXAMPLE
dff -e [dir2 [dir3...]]
#+END_EXAMPLE

In =exhaustive= mode, the complete file contents are compared and should not
have any false positives.

** JSON output

#+BEGIN_EXAMPLE
dff -j [-t|-e] [dir2 [dir3...]]
#+END_EXAMPLE

In order to produce JSON output, use the =-j= flag. This is useful for
programatically parsing the data.