#hash-values #file-checksum #hash #checksum #fingerprint #command-line-tool #generate

bin+lib hfile

Hfile is a command-line interface (CLI) tool for generating hash values of files

13 releases

new 0.3.7 Dec 10, 2024
0.3.6 Aug 31, 2024
0.3.5 Mar 5, 2024
0.3.3 Aug 26, 2023
0.3.2 Jun 26, 2023

#416 in Cryptography

Download history 183/week @ 2024-08-28 8/week @ 2024-09-04 10/week @ 2024-09-11 17/week @ 2024-09-18 13/week @ 2024-09-25 2/week @ 2024-10-02 1/week @ 2024-11-13 2/week @ 2024-11-20 66/week @ 2024-12-04

71 downloads per month

BSD-3-Clause

17KB
356 lines

hfile

hfile is a command-line interface (CLI) tool for generating cryptographic hashes from files while also facilitating the identification of duplicates.

Supported algorithms:

  • Blake3 (default)
  • md5
  • sha1
  • sha256
  • sha384
  • sha512

Current options:


Usage: hfile [OPTIONS] [FILE]

Arguments:
  [FILE]

Options:
  -a, --algorithm <ALGORITHM>  [default: blake] [possible values: md5, sha1, sha256, sha384, sha512, blake]
  -s, --size                   Show size of file
  -d, --duplicates             Find duplicates
  -p, --path <PATH>            Create hash for all files under path
  -h, --help                   Print help
  -V, --version                Print version

Example:

$ hfile test-file
9a689455c65ca329fbcae5a1ae8725d88c7a6fbc82fd25bbcd9370ad9c272c50    test-file

If need also the size of the file:

$ hfile -s test-file
9a689455c65ca329fbcae5a1ae8725d88c7a6fbc82fd25bbcd9370ad9c272c50    test-file    44B

To recursively get hash of all files within a directory:

$ hfile -p $HOME
<hash> <file path>

Finding duplicates:

$ hfile -d -p $HOME
will only print duplicates found

Dependencies

~11–20MB
~382K SLoC