====== Duplicate File Finder ======
New for Synchronet v3.19, this JavaScript utility script replaces the functionality of the old [[util:DUPEFIND]] program.

===== Invoke ======
Run with [[util:JSexec]]
  jsexec dupefind -help

<file>
usage: [-options] [[dir_code] [...]]
options:
  -lib=<name>     search for duplicates in specified library only
  -min=<bytes>    specify minimum file size to compare hash/sum
  -ex=<filename>  add to excluded file name list (case-insensitive)
  -names          search for duplicate file names (case-insensitive)
  -sha1           search for duplicate SHA-1 sums (the default)
  -crc32          search for duplicate CRC-32 sums
  -md5            search for duplicate MD5 sums
  -json[=space]   create JSON formatted output
  -v              increase verbosity of JSON output
  -dedupe         remove/delete duplicate files
</file>

If directories or libraries are specified, all directories will be searched for duplicate files.

==== Examples ====

* To search for duplicate files greater than 1KB in size, using their SHA-1 hash value, in all directories in all libraries:
  jsexec dupefind
  
* To search for duplicate file //names// in all directories in all libraries:
  jsexec dupefind -names
  
* To automatically remove all duplicate files in all directories in all libraries:
  jsexec dupefind -dedupe

===== See Also =====
  * [[:module:|module index]]

{{tag>jsutil files}}
