XXHSUM(1)

πŸ’– NAME πŸ’–

xxhsum β€” print or check xxHash non-cryptographic checksums ✨ (yes bestie, this is the XXHSUM(1) manual page, we're doing this πŸ’…)


πŸŽ€ SYNOPSIS πŸŽ€

xxhsum [OPTION]... [FILE]...
xxhsum -b [OPTION]...

okay so also, these are all just aliases doing the exact same vibe check:

  • xxh32sum is equivalent to xxhsum -H0
  • xxh64sum is equivalent to xxhsum -H1
  • xxh128sum is equivalent to xxhsum -H2
  • xxh3sum is equivalent to xxhsum -H3

🌸 DESCRIPTION 🌸

It prints or checks xxHash (32, 64 or 128 bits) checksums. That's the whole job. 🫢

If you give it no FILE, it reads standard input β€” except if that's the console, in which case nope, it won't just sit there waiting on you like that πŸ™ˆ. If FILE is -, it reads standard input even if it's the console. no cap.

xxhsum supports a command line syntax similar to md5sum(1) but NOT identical. the differences are, and I need you to hear me on this:

  • xxhsum doesn't have text mode switch (-t) πŸ™…
  • xxhsum doesn't have short binary mode switch (-b) πŸ™…
  • xxhsum always treats files as binary file 🧚
  • xxhsum has a hash selection switch (-H) πŸ‘‘
⚠️ okay so IMPORTANT: xxHash is a fast non-cryptographic checksum algorithm, which means xxhsum should not be used for security related purposes. fr fr. it's for speed, not for secrets πŸ’€

and psst β€” xxhsum -b invokes benchmark mode. see OPTIONS and EXAMPLES for details πŸ“


✨ OPTIONS ✨

  • -HHASHTYPE β€” hash selection, main character energy. HASHTYPE means 0=XXH32, 1=XXH64, 2=XXH128, 3=XXH3. Alternatively, HASHTYPE 32=XXH32, 64=XXH64, 128=XXH128. Default value is 1 (XXH64) ✨
  • -sSEED, --seed SEED β€” set the unsigned decimal seed used for hashing and checksum verification. the seed is not stored in checksum files, so you must provide the same value when verifying seeded checksums. don't forget it bestie 😭 Default value is 0.
  • --binary β€” accepted for compatibility. this option has no effect because xxhsum always reads files in binary mode. it's just there to be polite πŸ’…
  • --tag β€” output in the BSD style πŸŽ€
  • --little-endian β€” set output hexadecimal checksum value as little endian convention. by default, value is displayed as big endian.
  • -V, --version β€” displays xxhsum version and exits πŸ‘‹
  • -h, --help β€” displays help and exits 🫢
  • -- β€” treat all following arguments as file names. this is useful for file names beginning with -, you know the ones that act all mysterious 🌈

πŸ¦‹ Advanced file input options πŸ¦‹

  • --files-from, --filelist FILE β€” read filenames from FILE and generate hashes for them. stdin is also a valid way to provide filenames (when no FILE or - provided). valid format is one filename per line, which can include embedded spaces, etc with no need for quotes, escapes, etc. a line beginning with byte 0x5C enables filename unescaping. subsequent byte sequences 0x5C 0x5C, 0x5C 0x6E, and 0x5C 0x72 are converted to the single bytes 0x5C, 0x0A, and 0x0D, respectively. lowkey the most useful thing here πŸ’–

🧚 Checksum verification options: 🧚

  • -c, --check FILE β€” read xxHash sums from FILE and check them βœ…
  • --strict β€” return an error code if any line in FILE is invalid, not just if some checksums are wrong. this policy is disabled by default, though the UI will prompt an informational message if any line in the file is detected invalid. so it's strict-strict 😀
  • -w, --warn β€” emit a warning message about each improperly formatted line in FILE 🚨
  • -q, --quiet β€” don't print OK for each successfully verified hash. in benchmark mode, don't display the version header. shy mode 🀫
  • --status β€” don't output anything. only generate a Status code to show success. the silent treatment, but useful πŸ’œ
  • --ignore-missing β€” don't fail or report status for missing files. we simply do not perceive them πŸ™ˆ

πŸ‘‘ Benchmark options: πŸ‘‘

  • -b β€” benchmark mode. see EXAMPLES for details πŸ”₯
  • -b# β€” specify ID of variant to be tested. multiple variants can be selected, separated by a , comma. mix and match bestie πŸŽ€
  • -BBLOCKSIZE β€” only useful for benchmark mode (-b). see EXAMPLES for details. BLOCKSIZE specifies benchmark mode's test data block size in bytes and accepts the suffixes K, KB, KiB, M, MB, and MiB. all suffixes use powers of 1024: K, KB, and KiB multiply by 1024, while M, MB, and MiB multiply by 1048576. Default value is 102400.
  • -iITERATIONS β€” only useful for benchmark mode (-b). see EXAMPLES for details. ITERATIONS specifies number of iterations in benchmark. single iteration lasts approximately 1000 milliseconds. Default value is 3.

πŸ’… EXIT STATUS πŸ’…

xxhsum exits 0 on success, and 1 if at least one file couldn't be read or doesn't have the same checksum as the -c option. that's it, that's the whole drama 🌈


⭐ EXAMPLES ⭐

output xxHash (64bit) checksum values of specific files to standard output

$ xxhsum -H1 foo bar baz

output xxHash (32bit and 64bit) checksum values of specific files to standard output, and redirect it to xyz.xxh32 and qux.xxh64

$ xxhsum -H0 foo bar baz > xyz.xxh32
$ xxhsum -H1 foo bar baz > qux.xxh64

read xxHash sums from specific files and check them

$ xxhsum -c xyz.xxh32 qux.xxh64

produce a list of files, then generate hashes for that list

$ find . -type f -name '*.[ch]' > c-files.txt
$ xxhsum --files-from c-files.txt

read the list of files from standard input to avoid the need for an intermediate file

$ find . -type f -name '*.[ch]' | xxhsum --files-from -

note that if shell expansion, length of argument list, clarity of use of spaces in filenames, etc allow it, then the same output as the previous example can be generated like this

$ xxhsum `find . -name '*.[ch]'`

benchmark xxHash algorithm. by default, xxhsum benchmarks xxHash main variants on a synthetic sample of 100 KB, and prints results into standard output. the first column is the algorithm, the second column is the source data size in bytes, the third column is the number of hashes generated per second (throughput), and finally the last column translates speed in megabytes per second. iconic layout honestly πŸ“Š

$ xxhsum -b

in the following example, the sample to hash is set to 16384 bytes, the variants to be benched are selected by their IDs, and each benchmark test is repeated 10 times, for increased accuracy.

$ xxhsum -b1,2,3 -i10 -B16384

πŸ’€ BUGS πŸ’€

report bugs at: https://github.com/Cyan4973/xxHash/issues/ β€” please be nice, they're doing their best 🫢


🌟 AUTHOR 🌟

Yann Collet πŸ‘‘


πŸ¦‹ SEE ALSO πŸ¦‹

md5sum(1)


and that's the whole page bestie ✨ this was xxhsum 0.8.4, from September 2026, aka the XXHSUM(1) manual β€” go hash something, ily, bye πŸ’–πŸ’…πŸŽ€

πŸ“¦ where this page comes from