{"id":22180746,"url":"https://github.com/jftuga/dcmp","last_synced_at":"2025-06-15T04:06:14.050Z","repository":{"id":117698988,"uuid":"113256745","full_name":"jftuga/dcmp","owner":"jftuga","description":"Compare files within two directory trees for equivalency","archived":false,"fork":false,"pushed_at":"2020-10-12T14:06:49.000Z","size":14045,"stargazers_count":4,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T19:15:42.798Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jftuga.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":"2017-12-06T02:12:55.000Z","updated_at":"2024-10-02T10:46:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"887a9010-91b4-4401-9c6a-5601cd3b8e7a","html_url":"https://github.com/jftuga/dcmp","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/jftuga/dcmp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jftuga%2Fdcmp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jftuga%2Fdcmp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jftuga%2Fdcmp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jftuga%2Fdcmp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jftuga","download_url":"https://codeload.github.com/jftuga/dcmp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jftuga%2Fdcmp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259919455,"owners_count":22932071,"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":[],"created_at":"2024-12-02T09:19:31.215Z","updated_at":"2025-06-15T04:06:14.008Z","avatar_url":"https://github.com/jftuga.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dcmp\nCompare files within two directory trees for equivalency.\n\nThe purpose of this program is to recursively examine two directories to find all files that are either the \nsame, different, or mutually exclusive (in one folder, but not the other).  \n\nTwo files are considered to be the equivalent if they have the same:\n\n* Name\n* Size\n* Modification Time (this check can be excluded with **--ignoredate**)\n\nOnly metadata is compared.  File contents are not compared unless **--exact** is invoked.\nWhen this option is used, you may want to also invoke the **--threads** option to speed up processing.\n\nGroups of files and directories can be excluded with regular expressions via the **--exfile** and **--exdir** options.\n\nThis was written in **Python 3.6** and has been tested on Windows 10, Linux and MacOS Sierra.\n\nA Windows executable can be created with [PyInstaller 3.3](http://www.pyinstaller.org/):\n```\n    : ensure both dcmp.py and veryprettytablepatched.py are in the current directory\n    pyinstaller -F --noupx dcmp.py\n```\n\n**Usage**\n\n```\n    usage: dcmp [-h] [--recurse] [--threads THREADS] [--exact] [--ignoredate]\n                [--exdir EXDIR] [--exfile EXFILE]\n                [--diff | --same | --xor | --one | --two | --version] [--pgm PGM]\n                [--html] [--stats] [--verbose]\n                dname1 dname2\n    \n    Directory Compare: compare files within two directory trees for equivalency\n    \n    optional arguments:\n      -h, --help            show this help message and exit\n      --diff, -d            only show files that are different\n      --same, -s            only show files that are the same\n      --xor, -x             only show files residing in one directory or the\n                            other; but not both\n      --one, -1             only show files in dname1\n      --two, -2             only show files in dname2\n      --version             show program's version number and exit\n    \n    Positional Arguments:\n      These arguments come after any flags and in the order they are listed here\n      and are required.\n    \n      dname1                first directory to compare\n      dname2                second directory to compare\n    \n    Operational:\n      --recurse, -r         recusively traverse all subdirectories\n      --threads THREADS, -T THREADS\n                            use this number of threads\n      --exact, -e           compare file contents as well as metadata\n      --ignoredate, -id     do not compare file time stamps, good to use with -e\n      --exdot               ignore both files and directories that begin with a dot\n      --exdir EXDIR         a ; delimited list of regular expressions to exclude,\n                            only applied to directory names\n      --exfile EXFILE       a ; delimited list of regular expressions to exclude,\n                            only applied to file names\n    \n    Output Arguments:\n      --pgm PGM             output diff commands, by using PGM as your comparision\n                            program, must be used with -e\n      --html                create HTML output which should then be redirected to\n                            a file\n      --stats, -S           print run time \u0026 statistical totals to STDERR\n      --verbose, -v         output exclusions to STDERR\n\n```\n\n**Example**\n\n```\n    c:\\\u003e dcmp.exe -d -T8 -e --stats -r r:\\a r:\\b\n\n    The '*' denotes a newer or larger file\n    \n    ----------------------------------------------------------------------------------\n    | 1) r:\\a\\linux-4.14\\fs\\ext4                                                     |\n    | 2) r:\\b\\linux-4.14\\fs\\ext4                                                     |\n    +--------+-----------+--------+--------+--------+-------------------+------------+\n    |  fname | same meta | size-1 | size-2 | date-1 |            date-2 | exact data |\n    +--------+-----------+--------+--------+--------+-------------------+------------+\n    |  dos.h | Only in 2 |        |      0 |        | 12/06/17 14:41:29 |            |\n    | dos1.c | Only in 2 |        |  2,491 |        | 12/06/17 14:41:16 |            |\n    | dos2.c | Only in 2 |        |  2,538 |        | 12/06/17 14:41:18 |            |\n    | dos3.c | Only in 2 |        |  2,585 |        | 12/06/17 14:41:23 |            |\n    +--------+-----------+--------+--------+--------+-------------------+------------+\n    \n    --------------------------------------------------------------------------------------------------\n    | 1) r:\\a\\linux-4.14\\ipc                                                                         |\n    | 2) r:\\b\\linux-4.14\\ipc                                                                         |\n    +-----------+-----------+--------+--------+-------------------+---------------------+------------+\n    |     fname | same meta | size-1 | size-2 |            date-1 |              date-2 | exact data |\n    +-----------+-----------+--------+--------+-------------------+---------------------+------------+\n    |     sem.c |     False | 59,442 | 59,442 | 08/18/17 16:31:55 | * 11/12/17 13:46:13 |       True |\n    |     shm.c |     False | 39,497 | 39,497 | 08/18/17 16:31:55 | * 11/12/17 13:46:13 |       True |\n    | syscall.c |     False |  4,430 |  4,430 | 08/18/17 16:31:55 | * 11/12/17 13:46:13 |       True |\n    +-----------+-----------+--------+--------+-------------------+---------------------+------------+\n    \n    -------------------------------------------------------------------------------------------------\n    | 1) r:\\a\\linux-4.14\\mm                                                                         |\n    | 2) r:\\b\\linux-4.14\\mm                                                                         |\n    +----------+-----------+--------+--------+-------------------+---------------------+------------+\n    |    fname | same meta | size-1 | size-2 |            date-1 |              date-2 | exact data |\n    +----------+-----------+--------+--------+-------------------+---------------------+------------+\n    | z3fold.c |     False | 29,955 | 29,955 | 11/12/17 13:46:13 | * 11/18/17 01:50:58 |      False |\n    +----------+-----------+--------+--------+-------------------+---------------------+------------+\n    \n    ---------------------------------------------------------------------------------------------------\n    | 1) r:\\a\\linux-4.14\\net\\wimax                                                                    |\n    | 2) r:\\b\\linux-4.14\\net\\wimax                                                                    |\n    +----------+-----------+----------+--------+---------------------+-------------------+------------+\n    |    fname | same meta |   size-1 | size-2 |              date-1 |            date-2 | exact data |\n    +----------+-----------+----------+--------+---------------------+-------------------+------------+\n    | op-msg.c |     False | * 12,012 | 12,008 | * 12/07/17 19:19:19 | 11/12/17 13:46:13 |      False |\n    +----------+-----------+----------+--------+---------------------+-------------------+------------+\n    \n    -------------------------------------------------------------------------------------\n    | 1) r:\\a\\linux-4.14\\sound\\sparc                                                    |\n    | 2) r:\\b\\linux-4.14\\sound\\sparc                                                    |\n    +-----------+-----------+--------+--------+-------------------+--------+------------+\n    |     fname | same meta | size-1 | size-2 |            date-1 | date-2 | exact data |\n    +-----------+-----------+--------+--------+-------------------+--------+------------+\n    | sparkle.c | Only in 1 |    641 |        | 12/07/17 10:54:39 |        |            |\n    | sparkle.h | Only in 1 |    980 |        | 12/07/17 10:54:52 |        |            |\n    +-----------+-----------+--------+--------+-------------------+--------+------------+\n\n    --------------------------------------------------------------------------------------\n    | dcmp -d -T8 -e --stats -r r:\\a r:\\b                                                |\n    | runtime (h:m:s) 00:00:4.02                                                         |\n    +-----------+---------------+------------+----------------+--------------------------+\n    | same_meta | not_same_meta | exact_data | not_exact_data | same_meta_different_data |\n    +-----------+---------------+------------+----------------+--------------------------+\n    | 0         | 5             | 3          | 2              | 0                        |\n    +-----------+---------------+------------+----------------+--------------------------+\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjftuga%2Fdcmp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjftuga%2Fdcmp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjftuga%2Fdcmp/lists"}