Table of ContentsView in Frames

Calculating the fingerprint of a file

You can create a fingerprint for a file by using the file fingerprint command.

Step

  1. To perform the fingerprint operation, enter the following command:
    file fingerprint [-a {MD5|SHA-256}] [-m] [-d] [-x] path

    -a specifies the algorithm for fingerprint calculation. It can be either MD5 or SHA-256. By default, file fingerprinting uses the SHA-256 algorithm.

    -m specifies the metadata fingerprint calculation.

    -d specifies the data fingerprint calculation. By default, the fingerprint is calculated for both data and metadata.

    -x displays the output in XML format.

    path is the path of the file for which the fingerprint operation is required.

Example:

To display the regular output, enter the following command:

file fingerprint -a MD5 -m -d /vol/vol_worm/myfile

To display the XML output, include -x in the command:

file fingerprint -a MD5 -m -d -x /vol/vol_worm/myfile