{"id":17139108,"url":"https://github.com/virb3/naivecmp","last_synced_at":"2025-04-13T10:03:58.019Z","repository":{"id":161178716,"uuid":"635936898","full_name":"ViRb3/naivecmp","owner":"ViRb3","description":"Compare directories by fuzzy-matching file attributes without checking contents","archived":false,"fork":false,"pushed_at":"2025-03-19T11:33:18.000Z","size":49,"stargazers_count":5,"open_issues_count":7,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-27T01:23:13.466Z","etag":null,"topics":["compare","diff","directories","fast","files","fuzzy","gui","hash","move","naive","rename","sync"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ViRb3.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-05-03T19:24:10.000Z","updated_at":"2024-12-27T16:09:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"f1772ce4-259c-4ebb-a617-36c75e0efe7a","html_url":"https://github.com/ViRb3/naivecmp","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ViRb3%2Fnaivecmp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ViRb3%2Fnaivecmp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ViRb3%2Fnaivecmp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ViRb3%2Fnaivecmp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ViRb3","download_url":"https://codeload.github.com/ViRb3/naivecmp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248695332,"owners_count":21146954,"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":["compare","diff","directories","fast","files","fuzzy","gui","hash","move","naive","rename","sync"],"created_at":"2024-10-14T20:11:25.621Z","updated_at":"2025-04-13T10:03:57.993Z","avatar_url":"https://github.com/ViRb3.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## naivecmp\n\n\u003e Compare directories by fuzzy-matching file attributes without checking contents.\n\nYou are in a good habit of making periodic backups. After a certain point, you may want to clear your oldest backup to free space for new ones. But how do you know if something important wasn't accidentally deleted in the meantime? If you don't know what to look for, you may only find out years later, after this data is gone from all backups.\n\nnaivecmp aims to solve this problem by providing you with a very fast way to compare backups and/or your current state. The algorithm is able to track files even after they have been moved and/or renamed, which greatly reduces noise. It works by hashing files based on their file attributes (size + modification time), rather than name or content.\n\n### Disclaimer\n\nWhile this tool has been perfectly accurate in my own tests, it is still fundamentally flawed (thus the \"naive\" name) — you may get false negatives if two different files have the same file attributes, or if the content of a file was changed without altering its size or modification time. In case there are hash collisions, naivecmp will fall back to comparing the full path, but even then, this is not a 100% guarantee the files are identical. Therefore, do not rely on this tool for mission-critical decisions. Use it only as a quick way to check the \"most likely\" changes between two directories.\n\n### Features\n\n- Bi-directional diff\n- Very fast (10TB+ hard drive array in less than 20 seconds on a Raspberry Pi 4)\n- Low memory usage (less than 300MB for scanning 10TB+ of data)\n- Configurable matching conditions\n- Tracks files even when they were moved and/or renamed\n- Parallel directory scanning\n- TreeView GUI and text mode\n\n### Usage\n\n```bash\nUsage: naivecmp \u003cdir-a\u003e \u003cdir-b\u003e\n\nCompare directories by fuzzy-matching file attributes without checking contents.\n\nArguments:\n  \u003cdir-a\u003e    Directory A.\n  \u003cdir-b\u003e    Directory B.\n\nFlags:\n  -h, --help            Show context-sensitive help.\n      --use-mod-time    Use file mod time (default true).\n      --use-size        Use file size (default true).\n      --use-mode        Use file mode (default false).\n      --use-name        Use file name even when there is no collision (default false).\n      --use-path        Use file directory path (default false).\n      --workers=6       Count of parallel workers per directory.\n      --text            Print results in text instead of GUI.\n      --file-count      Print file counts in GUI mode (default true).\n```\n\nIn GUI mode (default), you will be presented with a TreeView that lets you explore the differences in each directory.\n\n| Hotkeys                   | Colors                                   |\n| ------------------------- | ---------------------------------------- |\n| [q] quit                  | [white] new file                         |\n| [space] switch views      | [green] directory                        |\n| [tab] focus in other view | [yellow] directory present in both sides |\n| [shift+] free move        | [blue] file present in both sides        |\n| [F1] toggle all           |                                          |\n| [1-9] toggle at depth     |                                          |\n| [d] hide from view        |                                          |\n\nIn text mode, differences will be printed to stdout, while status updates will go to stderr.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvirb3%2Fnaivecmp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvirb3%2Fnaivecmp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvirb3%2Fnaivecmp/lists"}