1XXHSUM(1)                        User Commands                       XXHSUM(1)
2
3
4

NAME

6       xxhsum - print or check xxHash non-cryptographic checksums
7

SYNOPSIS

9       xxhsum [OPTION]... [FILE]...
10       xxhsum -b [OPTION]...
11
12       xxh32sum  is equivalent to xxhsum -H0, xxh64sum is equivalent to xxhsum
13       -H1, xxh128sum is equivalent to xxhsum -H2.
14

DESCRIPTION

16       Print or check xxHash (32, 64 or 128 bits) checksums.
17       When no FILE, read standard input, except if  it's  the  console.  When
18       FILE is -, read standard input even if it's the console.
19
20       xxhsum  supports  a  command  line  syntax similar but not identical to
21       md5sum(1). Differences are:
22
23xxhsum doesn't have text mode switch (-t)
24
25xxhsum doesn't have short binary mode switch (-b)
26
27xxhsum always treats files as binary file
28
29xxhsum has a hash selection switch (-H)
30
31
32
33       As xxHash is a fast non-cryptographic checksum algorithm, xxhsum should
34       not be used for security related purposes.
35
36       xxhsum -b invokes benchmark mode. See OPTIONS and EXAMPLES for details.
37

OPTIONS

39       -V, --version
40              Displays xxhsum version and exits
41
42       -HHASHTYPE
43              Hash  selection.  HASHTYPE  means  0=XXH32,  1=XXH64,  2=XXH128,
44              3=XXH3. Note that -H3 triggers --tag,  which  can't  be  skipped
45              (this  is to reduce risks of confusion with -H2 (XXH64)). Alter‐
46              natively, HASHTYPE 32=XXH32, 64=XXH64, 128=XXH128. Default value
47              is 1 (XXH64)
48
49       --binary
50              Read in binary mode.
51
52       --tag  Output in the BSD style.
53
54       --little-endian
55              Set  output  hexadecimal checksum value as little endian conven‐
56              tion. By default, value is displayed as big endian.
57
58       -h, --help
59              Displays help and exits
60
61   The following options are useful only when verifying checksums (-c):
62       -c, --check FILE
63              Read xxHash sums from FILE and check them
64
65       -q, --quiet
66              Don't print OK for each successfully verified file
67
68       --strict
69              Return an error code if any line in the  file  is  invalid,  not
70              just if some checksums are wrong. This policy is disabled by de‐
71              fault, though UI will prompt an  informational  message  if  any
72              line in the file is detected invalid.
73
74       --status
75              Don't output anything. Status code shows success.
76
77       -w, --warn
78              Emit  a warning message about each improperly formatted checksum
79              line.
80
81   The following options are useful only benchmark purpose:
82       -b     Benchmark mode. See EXAMPLES for details.
83
84       -b#    Specify ID of variant to be tested. Multiple variants can be se‐
85              lected, separated by a ',' comma.
86
87       -BBLOCKSIZE
88              Only  useful  for benchmark mode (-b). See EXAMPLES for details.
89              BLOCKSIZE specifies benchmark mode's test  data  block  size  in
90              bytes. Default value is 102400
91
92       -iITERATIONS
93              Only  useful  for benchmark mode (-b). See EXAMPLES for details.
94              ITERATIONS specifies number of iterations in  benchmark.  Single
95              iteration  lasts  approximately 1000 milliseconds. Default value
96              is 3
97

EXIT STATUS

99       xxhsum exit 0 on success, 1 if at least one file couldn't  be  read  or
100       doesn't have the same checksum as the -c option.
101

EXAMPLES

103       Output  xxHash  (64bit)  checksum  values of specific files to standard
104       output
105
106
107           $ xxhsum -H1 foo bar baz
108
109
110
111       Output xxHash (32bit and 64bit) checksum values of  specific  files  to
112       standard output, and redirect it to xyz.xxh32 and qux.xxh64
113
114
115           $ xxhsum -H0 foo bar baz > xyz.xxh32
116           $ xxhsum -H1 foo bar baz > qux.xxh64
117
118
119
120       Read xxHash sums from specific files and check them
121
122
123           $ xxhsum -c xyz.xxh32 qux.xxh64
124
125
126
127       Benchmark  xxHash  algorithm. By default, xxhsum benchmarks xxHash main
128       variants on a synthetic sample of 100 KB, and print results into  stan‐
129       dard  output.  The  first column is the algorithm, the second column is
130       the source data size in bytes, the third column is the number of hashes
131       generated  per  second (throughput), and finally the last column trans‐
132       lates speed in megabytes per second.
133
134
135           $ xxhsum -b
136
137
138
139       In the following example, the sample to hash is set to 16384 bytes, the
140       variants  to  be  benched are selected by their IDs, and each benchmark
141       test is repeated 10 times, for increased accuracy.
142
143
144           $ xxhsum -b1,2,3 -i10 -B16384
145
146
147

BUGS

149       Report bugs at: https://github.com/Cyan4973/xxHash/issues/
150

AUTHOR

152       Yann Collet
153

SEE ALSO

155       md5sum(1)
156
157
158
159xxhsum 0.8.2                       July 2023                         XXHSUM(1)
Impressum