Metadata-Version: 2.1
Name: pnu_dcmp
Version: 1.0.0
Summary: compare two directories
Home-page: https://github.com/HubTou/dcmp/
Author: Hubert Tournier
Author-email: nobody@nowhere.invalid
License: BSD 3-Clause License
Project-URL: Bug Tracker, https://github.com/HubTou/dcmp/issues
Keywords: pnu-project
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: BSD License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Operating System :: POSIX :: BSD :: FreeBSD
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.0
Classifier: Programming Language :: Python :: 3.1
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: System
Classifier: Topic :: Utilities
Requires-Python: >=3.0
Description-Content-Type: text/markdown
License-File: License

# Installation
pip install [pnu-dcmp](https://pypi.org/project/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
[cmp(1)](https://www.freebsd.org/cgi/man.cgi?query=cmp),
[sha256(1)](https://www.freebsd.org/cgi/man.cgi?query=sha256)

## STANDARDS
The **dcmp** utility is not a standard UNIX command.

This implementation tries to follow the [PEP 8](https://www.python.org/dev/peps/pep-0008/) style guide for [Python](https://www.python.org/) code.

## PORTABILITY
To be tested under Windows.

## HISTORY
This implementation was made for the [PNU project](https://github.com/HubTou/PNU).

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](https://opensource.org/licenses/BSD-3-Clause).

## AUTHORS
[Hubert Tournier](https://github.com/HubTou)



