compare two directories
Project description
Installation
pip install pnu-dcmp
DCMP(1)
NAME
dcmp - compare two directories, deduplicating if needed
SYNOPSIS
dcmp [--dedup] [-h|--nosymlinks] [-s|--silent|--quiet] [-v|--verbose] [--debug] [--help|-?] [--version] [--] directory1 directory2
DESCRIPTION
The dcmp utility compares two directories contents and writes the results to the standard output. By default, dcmp is silent if the directories are the same; if they differ, the differences are reported with a leading:
- '!' if files contents are different
- '+' if the file or directory appears in directory1 but not in directory2
- '-' if the file or directory appears in directory2 but not in directory1
- '=' if the files contents are identical and you used the -v|--verbose option
If you use the -s|--silent|--quiet option, differences won't be reported and the overall result will be returned though the exit status (thus stopping the comparison at the first difference).
By default, dcmp follows symlinks to directories, unless you tell it not to do so with the -h|--nosymlinks option, or you use the --dedup option for deduplicating the first directory, removing identical files and empty directories sitting there.
OPTIONS
The following options are available:
Options | Use |
---|---|
--dedup | In dir1, remove empty dirs and files which are identical to those in dir2 |
-h|--nosymlinks | Do not follow symlinks |
-s|--silent|--quiet | Print nothing for differing dirs; return exit status only |
-v|--verbose | Print identical dirs and files names |
--debug | Enable debug mode |
--help|-? | Print usage and a short help message and exit |
--version | Print version and exit |
-- | Options processing terminator |
ENVIRONMENT
The DCMP_DEBUG environment variable can also be set to any value to enable debug mode.
EXIT STATUS
The dcmp utility exits with one of the following values:
- 0: The directories are identical
- 1: The directories are different
- >1: An error occurred
SEE ALSO
STANDARDS
The dcmp utility is not a standard UNIX command.
This implementation tries to follow the PEP 8 style guide for Python code.
PORTABILITY
To be tested under Windows.
HISTORY
This implementation was made for the PNU project.
The dcmp utility was made to help spot potential differences between restored backups and current files and directories.
LICENSE
It is available under the 3-clause BSD license.
AUTHORS
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pnu_dcmp-1.0.0.tar.gz
.
File metadata
- Download URL: pnu_dcmp-1.0.0.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a3c1426f6104e8af898b01789ae2e2059342f47dd5bbc641847518afbbb354a |
|
MD5 | a45f1efdeb1a9891faa63af8703b07ba |
|
BLAKE2b-256 | 613a7c73c6c573a24e0787343aaf481a0ecad913b6045c773b1b1003ba2dbb79 |
File details
Details for the file pnu_dcmp-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: pnu_dcmp-1.0.0-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 629c4effa5bef9dcf353a09944579636f83cb04df512f365a887f5f95015c6d4 |
|
MD5 | c853aaf6fda929f39f1006d85871ee64 |
|
BLAKE2b-256 | a99b2a2e13573c7c2c7b70dc8948e134ac3a23cc07eb13d84170ce2f762b94b6 |