{"id":19832202,"url":"https://github.com/uxcn/yafd","last_synced_at":"2025-09-18T09:31:51.684Z","repository":{"id":151038496,"uuid":"51421119","full_name":"uxcn/yafd","owner":"uxcn","description":"yet another file deduplicator","archived":false,"fork":false,"pushed_at":"2019-10-04T04:58:51.000Z","size":221,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-12T11:43:06.851Z","etag":null,"topics":["c","deduplicator","freebsd","linux","osx","windows"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uxcn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-02-10T04:36:15.000Z","updated_at":"2024-01-26T09:32:43.000Z","dependencies_parsed_at":"2023-04-11T08:33:26.606Z","dependency_job_id":null,"html_url":"https://github.com/uxcn/yafd","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uxcn%2Fyafd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uxcn%2Fyafd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uxcn%2Fyafd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uxcn%2Fyafd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uxcn","download_url":"https://codeload.github.com/uxcn/yafd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233466586,"owners_count":18680564,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","deduplicator","freebsd","linux","osx","windows"],"created_at":"2024-11-12T11:36:47.153Z","updated_at":"2025-09-18T09:31:46.173Z","avatar_url":"https://github.com/uxcn.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# yafd #\n\n[![build status](https://travis-ci.org/uxcn/yafd.svg?branch=master)](https://travis-ci.org/uxcn/yafd)\n[![build status](https://ci.appveyor.com/api/projects/status/tfikjw9me77nvuw5?svg=true)](https://ci.appveyor.com/project/uxcn/yafd)\n[![coverage status](https://coveralls.io/repos/github/uxcn/yafd/badge.svg?branch=master)](https://coveralls.io/github/uxcn/yafd?branch=master)\n[![issues](https://img.shields.io/github/issues/uxcn/yafd.svg)](https://github.com/uxcn/yafd/issues)\n\nyafd is a (yet another) file deduplicator.\n\n## Usage ##\n\nFor detailed info, see [USAGE](https://github.com/uxcn/yafd/blob/master/USAGE.md) or the\nmanpage (`man yafd`).\n\nThe easiest way to use yafd is to pass a directory or a set of directories to\nit.\n\n    jason@io ~ yafd .\n\nIt can recurse as well.\n\n    jason@io ~ yafd -r .\n\nAnother easy way to use yafd is passing files to check as arguments.  Shell\nglobbing helps.\n\n    jason@io ~ yafd **/*.c **/*.h\n\nYou can also pipe paths to yafd via stdin.  This makes it easy to limit the sets\nof files to check.\n\n    jason@io ~ find . -size +1M | yafd\n\nThe output can also be piped to other commands to do things with the duplicate files.\n\n    jason@io ~ find /usr/src -size +1M | yafd | xargs du -b | awk '{ x+=$1; } END { print x; }'\n    12659698\n\n## Performance ##\n\nAs of yet, yafd is not always the fastest deduplicator (see hdd performance).\nIf performance is a concern, it may be worth considering another deduplicator\nlike [rmlint](https://github.com/sahib/rmlint).  Performance can be optimized\nusing command arguments (`--bytes`, `--blocksize`, `--threads`, etc...),\nalthough yafd with defaults should be usable for most tasks.\n\nHere are some metrics for reference.\n\n**SSD (btrfs)**\n\n\u003ctable\u003e\n\u003ctr\u003e\u003cth\u003e\u003c/th\u003e\u003cth\u003etime\u003c/th\u003e\u003cth\u003ethroughput\u003c/th\u003e\u003cth\u003ethroughput (dup)\u003c/th\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e\u003ccode\u003eyafd\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e4.30s\u003c/td\u003e\u003ctd\u003e267.88 MiB/s\u003c/td\u003e\u003ctd\u003e175.70 MiB/s\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e\u003ccode\u003ermlint\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e7.43s\u003c/td\u003e\u003ctd\u003e155.13 MiB/s\u003c/td\u003e\u003ctd\u003e101.74 MiB/s\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e\u003ccode\u003efdupes\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e30.34s\u003c/td\u003e\u003ctd\u003e37.99 MiB/s\u003c/td\u003e\u003ctd\u003e24.92 MiB/s\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e\u003ccode\u003eduff\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e25.14s\u003c/td\u003e\u003ctd\u003e45.86 MiB/s\u003c/td\u003e\u003ctd\u003e30.08 MiB/s\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e\u003ccode\u003eyafd (cached)\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e0.61s\u003c/td\u003e\u003ctd\u003e1.84 GiB/s\u003c/td\u003e\u003ctd\u003e1.20 GiB/s\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e\u003ccode\u003ermlint (cached)\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e2.46s\u003c/td\u003e\u003ctd\u003e466.21 MiB/s\u003c/td\u003e\u003ctd\u003e307.40 MiB/s\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e\u003ccode\u003efdupes (cached)\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e12.27s\u003c/td\u003e\u003ctd\u003e93.94 MiB/s\u003c/td\u003e\u003ctd\u003e61.61 MiB/s\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e\u003ccode\u003eduff (cached)\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e6.51s\u003c/td\u003e\u003ctd\u003e176.17 MiB/s\u003c/td\u003e\u003ctd\u003e116.12 MiB/s\u003c/td\u003e\u003c/tr\u003e\n\u003c/table\u003e\n\n**HDD (ext4)**\n\n\u003ctable\u003e\n\u003ctr\u003e\u003cth\u003e\u003c/th\u003e\u003cth\u003etime\u003c/th\u003e\u003cth\u003ethroughput\u003c/th\u003e\u003cth\u003ethroughput (dup)\u003c/th\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e\u003ccode\u003eyafd\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e1087.59s\u003c/td\u003e\u003ctd\u003e1.05 MiB/s\u003c/td\u003e\u003ctd\u003e711.99 KiB/s\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e\u003ccode\u003ermlint\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e65.03s\u003c/td\u003e\u003ctd\u003e163.46 MiB/s\u003c/td\u003e\u003ctd\u003e107.21 MiB/s\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e\u003ccode\u003efdupes\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e322.57s\u003c/td\u003e\u003ctd\u003e3.57 MiB/s\u003c/td\u003e\u003ctd\u003e2.34 MiB/s\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e\u003ccode\u003eduff\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e954.70s\u003c/td\u003e\u003ctd\u003e1.20 MiB/s\u003c/td\u003e\u003ctd\u003e811.10 KiB/s\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e\u003ccode\u003eyafd (cached)\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e7.05s\u003c/td\u003e\u003ctd\u003e163.46 MiB/s\u003c/td\u003e\u003ctd\u003e107.21 MiB/s\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e\u003ccode\u003ermlint (cached)\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e2.84s\u003c/td\u003e\u003ctd\u003e406.37 MiB/s\u003c/td\u003e\u003ctd\u003e266.53 MiB/s\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e\u003ccode\u003efdupes (cached)\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e12.44s\u003c/td\u003e\u003ctd\u003e92.64 MiB/s\u003c/td\u003e\u003ctd\u003e60.76 MiB/s\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e\u003ccode\u003eduff (cached)\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e6.56s\u003c/td\u003e\u003ctd\u003e175.76 MiB/s\u003c/td\u003e\u003ctd\u003e115.28 MiB/s\u003c/td\u003e\u003c/tr\u003e\n\u003c/table\u003e\n\n**NFS (v4)**\n\n\u003ctable\u003e\n\u003ctr\u003e\u003cth\u003e\u003c/th\u003e\u003cth\u003etime\u003c/th\u003e\u003cth\u003ethroughput\u003c/th\u003e\u003cth\u003ethroughput (dup)\u003c/th\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e\u003ccode\u003eyafd\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e197.08s\u003c/td\u003e\u003ctd\u003e5.85 MiB/s\u003c/td\u003e\u003ctd\u003e3.83 MiB/s\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e\u003ccode\u003ermlint\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e461.26s\u003c/td\u003e\u003ctd\u003e2.49 MiB/s\u003c/td\u003e\u003ctd\u003e1.63 MiB/s\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e\u003ccode\u003efdupes\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e648.24s\u003c/td\u003e\u003ctd\u003e1.77 MiB/s\u003c/td\u003e\u003ctd\u003e1.16 MiB/s\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e\u003ccode\u003eduff\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e466.69s\u003c/td\u003e\u003ctd\u003e2.47 MiB/s\u003c/td\u003e\u003ctd\u003e1.62 MiB/s\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e\u003ccode\u003eyafd (cached)\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e95.04s\u003c/td\u003e\u003ctd\u003e12.13 MiB/s\u003c/td\u003e\u003ctd\u003e7.95 MiB/s\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e\u003ccode\u003ermlint (cached)\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e423.90s\u003c/td\u003e\u003ctd\u003e2.71 MiB/s\u003c/td\u003e\u003ctd\u003e1.78 MiB/s\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e\u003ccode\u003efdupes (cached)\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e611.19s\u003c/td\u003e\u003ctd\u003e1.88 MiB/s\u003c/td\u003e\u003ctd\u003e1.23 MiB/s\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e\u003ccode\u003eduff (cached)\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e403.72s\u003c/td\u003e\u003ctd\u003e2.85 MiB/s\u003c/td\u003e\u003ctd\u003e1.87 MiB/s\u003c/td\u003e\u003c/tr\u003e\n\u003c/table\u003e\n\n(1) The linux sources were searched for identical files (4.3, 4.4)\n\n(2) For an equivalent comparison, the following command arguments were used\n(also [see](https://github.com/uxcn/yafd/tree/master/perf/src/python/benchmark))\n\n    yafd --recurse --zero\n    rmlint --algorithm=paranoid --hidden -o fdupes:stdout\n    fdupes --recurse\n    duff -rpta -f#\n\n(3) Linux 4.4.0 and Intel Ivy Bridge (i7-3632QM) were used for benchmarks\n\n## Install ##\n\nYou can download a copy of the source\n[here](https://github.com/uxcn/yafd/releases) or you can clone the repository\nusing git.\n\n    jason@io ~ git clone git://github.com:uxcn/yafd.git\n\nIt's a good idea to check out a specific release.\n\n    jason@io ~/yafd git checkout v0.1\n\nIn the project directory, run the autoconf script.\n\n    jason@io ~/yafd ./autoconf.sh CFLAGS='-march=native -mtune=native -O2'\n\nAdding the architecture allows algorithms that rely on architecutre specific\nimplementations to be used.  The easiest way to do this is normally\n`-march=native`.   You can also explicitly enable instruction sets\nvia autoconf.\n\n    jason@io ~/yafd ./autoconf.sh --enable-sse4_2\n\nTo install to a directory other than /usr/local, you can manually configure the\nprefix.  If you do, make sure your `PATH` and `MANPATH` are set correctly.\n\n    jason@io ~/yafd ./autoconf.sh --prefix=$HOME\n\nRun `make install` to compile and install.\n\n    jason@io ~/yafd $ make install\n\nCurrently yafd compiles and is tested on Linux, FreeBSD, OSX, and Windows.\nAlthough, patches and pull requests for others are definitely welcome.\n\n## Versions ##\n\n0.1 - alpha release\n\n## FAQ ##\n\nWhy write another file deduplicater?\n\n*A lot of the current ones were more complicated than I wanted, didn't perform\nwell, or weren't portable.*\n\nWhy doesn't yafd do *X*?\n\n*Most likely nobody asked for X yet.  If you think something's missing, send a\nfeature [request](https://github.com/uxcn/yafd/issues) or even better, a [pull\nrequest](https://github.com/uxcn/yafd/pull/new/master).*\n\nHow does yafd work?\n\n*The basic algorithm is to group files by their sizes, compute a hash on a small\n(random) chunk of each file, and then compare files that have the same hash.\nThis is a bit of an oversimplicification though.  For a better understanding, it\nmay help to try reading the\n[code](https://github.com/uxcn/yafd/blob/master/src/c/worker.c).*\n\n## other deduplicators ##\n\n* [rmlint](https://github.com/sahib/rmlint)\n* [fdupes](https://github.com/adrianlopezroche/fdupes)\n* [duff](https://github.com/elmindreda/duff)\n* others...\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuxcn%2Fyafd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuxcn%2Fyafd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuxcn%2Fyafd/lists"}