DIRHASH(1) User Commands DIRHASH(1)

dirhash - Python module and CLI for hashing of file system directories.

usage: dirhash [-h] [-v] [-a] [-m [...]] [-i [...]] [--empty-dirs]

[--no-linked-dirs] [--no-linked-files] [-p
[...]] [-c]
[-s CHUNK_SIZE] [-j JOBS] [-l] directory

Determine the hash for a directory.

Directory to hash.

show this help message and exit
show program's version number and exit
Hashing algorithm to use, by default "md5". Always available: ['md5', 'sha1', 'sha224', 'sha256', 'sha384', 'sha512']. Additionally available on current platform: ['blake2b', 'blake2s', 'md4', 'md5-sha1', 'ripemd160', 'sha3_224', 'sha3_256', 'sha3_384', 'sha3_512', 'sha512_224', 'sha512_256', 'shake_128', 'shake_256', 'sm3', 'whirlpool']. Note that the same algorithm may appear multiple times in this set under different names (thanks to OpenSSL) [https://docs.python.org/2/library/hashlib.html]

Specify what files and directories to include. All files and directories (including symbolic links) are included by default. The --match/--ignore arguments allows for selection using glob/wildcard (".gitignore style") path matching. Paths relative to the root `directory` (i.e. excluding the name of the root directory itself) are matched against the provided patterns. For example, to only include python source files, use: `dirhash path/to/dir -m "*.py"` or to exclude hidden files and directories use: `dirhash path/to.dir -i ".*" ".*/"` which is short for `dirhash path/to.dir -m "*" "!.*" "!.*/"`. By adding the --list argument, all included paths, for the given filtering arguments, are returned instead of the hash value. For further details see https://github.com/andhus/dirhash/README.md#filtering
[ ...], --match [ ...] One or several patterns for paths to include. NOTE: patterns with an asterisk must be in quotes ("*") or the asterisk preceded by an escape character (\*).
[ ...], --ignore [ ...] One or several patterns for paths to exclude. NOTE: patterns with an asterisk must be in quotes ("*") or the asterisk preceded by an escape character (\*).
Include empty directories (containing no files that meet the matching criteria and no non-empty sub directories).
Do not include symbolic links to other directories.
Do not include symbolic links to files.

Specify what properties of files and directories to include and whether to allow cyclic links. For further details see https://github.com/andhus/dirhash/DIRHASH_STANDARD.md#protocol
[ ...], --properties [ ...] List of file/directory properties to include in the hash. Available properties are: ['name', 'data', 'is_link'] and at least one of name and data must be included. Default is [data name] which means that both the name/paths and content (actual data) of files and directories will be included
Allow presence of cyclic links (by hashing the relative path to the target directory).

Implementation options:

The chunk size (in bytes) for reading of files.
Number of jobs (parallel processes) to use.

List the file paths that will be taken into account, given the provided filtering options.

The full documentation for dirhash is maintained as a Texinfo manual. If the info and dirhash programs are properly installed at your site, the command

info dirhash

should give you access to the complete manual.

December 2021 dirhash 0.2.1