multihash(1) FreeBSD General Commands Manual multihash(1)


multihash — create hash values for multiple algorithms for inputs


multihash [−hrs] [−f|−m] [−l str] [−o mode] ⟨

                                                    algs⟩ ⟨                                                             input ...


multihash is a command-line tool for creating message digest (hash) values using multiple algorithms in parallel. Inputs can be given individually on the command-line, piped in through stdin(4) or passed through lists supplied in the previous two methods. Output is available in several formats compatible with other tools currently available.



Comma-seperated list of message digest algorithms to perform for each input.

input ...
List of inputs. These can be a relative or absolute path plus file name or the special value ‘-’ for stdin(4).

The following options are available:

Find-List mode treats all inputs as lists of files to be hashed. The list-files should contain one file per line. In recursive mode directories are also valid in list-files.

This mode is intended to be used is combination with tools like find(1).

−l str
Delimiter for delimited-output mode.

Show usage text.

Match mode will compare the hash values of pairs of inputs. Match mode will also work in recursive mode and will indicate files that exist in only one of the input pair. Match mode works something like a recursive diff(1) only giving hash values instead of patches.

−o mode
Sets the output mode used (Default openssl). (See below for valid output modes).

Inputs that are directories will be recursively prosessed and a hash value will be given for every accessible object within the directory structure rooted at the input.

Silent operation, no errors or warnings will be emited.

Output Modes Available:

Output compatible with that of the OpenSSL command-line tools. One hash value per-line, per-file.

md5deep, md5sum
Output compatible with the named tool. These formats give no indication what hash value is given. The user will need to use other means to distinguish between the hash values for a file. Note, however, that the hash values for every file will be output in the order the algorithms were specified on the command-line.

delimited, tab, csv
Output one file per-line with all the hashes in delimited columns. The column delimiter can be specified via the −l command-line option or, if not specified, defaults to a tab-character.

The tab and csv modes imply a tab-character and comma respectively.


Find all files in /path/name and compute the MD5 hash value.

% find /path/name -type f | multihash -f md5 -

Compute the SHA1 for all file-system objects under /path/name.

% multihash -r sha1 /path/name

Compute the MD5 and SHA1 values for file and display the output in comma-delimited output.

% multihash -o csv md5,sha1 file

Compare /path/1 and /path/2 to be sure both contain the same files and that the files produce the same hashes.

% multihash -mr md5 /path/1 /path/2


Ryan Sommers ⟨⟩


multihash is copyright Ryan Sommers ⟨⟩

OpenSSL copyright information is available at

md5deep was written by Jesse Kornblum ⟨⟩

FreeBSD 6.0 July 24, 2005 FreeBSD 6.0