RHASH(1)
β¨ rhash(1) β User Manuals β¨
β¨ NAME β¨
rhash β calculate/check CRC32, MD5, SHA1, GOST, TTH, BTIH or other message digests.
π¦ SYNOPSIS π¦
rhash [ option ]... [ file ]...
π DESCRIPTION π
okay so RHash (Recursive Hasher) is literally the main character of checksums. It computes and verifies various message digests and checksums of files. Supported hash algorithms include CRC32, CRC32C, MD4, MD5, SHA1, SHA256, SHA512, SHA3, Tiger, DC++ TTH, BTIH, AICH, ED2K, GOST R 34.11-*, RIPEMD-160, HAS-160, BLAKE2s/BLAKE2b, BLAKE3, EDON-R 256/512, Whirlpool, Snefru-128/256. the way that lineup ate, no cap π₯
The program can create and verify Magnet links and eDonkey ed2k:// links, see --magnet and --ed2k-link options. iykyk π«Ά
A dash string parameter - is interpreted as the standard input stream (stdin). not me reading from stdin π
By default rhash prints sums in SFV format with CRC32 checksum only. The format can be changed by options --bsd, --magnet, --simple, --printf, --template. To output all sums use the -a option. periodt β¨
π PROGRAM MODE OPTIONS π
bestie, the default mode is to print checksums for all files and directory trees specified by command line. The mode can be changed by the following options. choose your vibe:
-c,--checkβ Check hash files specified by command line. RHash can verify hash files in SFV and BSD formats, MD5 and SHA1 files format and text files containing magnet or ed2k links (one link per line). Empty lines and lines starting with;or#are ignored. so clean, so organized
RHash can verify hash files generated without --printf and --template formatting options.
If the hash algorithm is not specified by command line options then RHash tries to detect algorithm from the extension of the hash file. If detection fails, then all hash function of the same hash length are calculated, and that significantly slows down files verification. To speed up verification, in such case, explicitly specify the hash algorithm in the command line.
-u,--update=<hash-file>β Update the specified hash file by computing message digests for files listed in command arguments that aren't present in it. New digests are appended in the format specified by formatting options. glow up your hash file
With --recursive, updates the hash file using files from entire directory trees. With --check, verifies existing digests before updating.
--missing=<hash-file>β List files from the hash file that are missing or inaccessible in the filesystem. gone girl energy--unverified=<hash-file>β List command-line files missing from the given hash file (unverified files). With--recursive, checks entire directory trees for unverified files. whoβs missing? vibe check-k,--check-embeddedβ Verify files by crc32 sum embedded in their names. name reveal--torrentβ Create a torrent file for each processed file. torrent era-h,--helpβ Help: print help screen and exit. we love support-V,--versionβ Version: print version and exit. flex the version-B,--benchmarkβ Run benchmark for the selected hash algorithm(s). race them
π₯ HASH ALGORITHMS OPTIONS π₯
pick your fighter, bestie β these select which hash function(s) rhash will use. each one is iconic in its own way.
-C,--crc32β CRC32: Select CRC32 checksum algorithm.--crc32cβ CRC32C: Select CRC32C checksum algorithm.--md4β MD4: Select MD4 hash function.-M,--md5β MD5: Select MD5 hash function.-H,--sha1β SHA1: Select SHA1 hash function.--sha224,--sha256,--sha384,--sha512β Select specified SHA2 hash function.--sha3-224,--sha3-256,--sha3-384,--sha3-512β Select specified SHA3 hash function.--tigerβ Tiger: Select Tiger hash function.-T,--tthβ TTH: Select DC++ TTH hash function.--btihβ BTIH: Select BitTorrent Info Hash.-A,--aichβ AICH: Select AICH hash function.-E,--ed2kβ ED2K: Select eDonkey 2000 hash function.-W,--whirlpoolβ Whirlpool: Select Whirlpool hash function.-G,--gost12-256β GOST-2012: Select 256-bit GOST R 34.11-2012, the Russian GOST standard hash function.--gost12-512β GOST-2012: Select 512-bit GOST R 34.11-2012, the Russian GOST standard hash function.--gost94β GOST-94: Select GOST R 34.11-94, the deprecated Russian hash function.--gost94-cryptoproβ GOST-94-CRYPTOPRO: Select the CryptoPro version of the deprecated Russian GOST R 34.11-94 hash function.--ripemd160β RIPEMD-160: Select RIPEMD-160 hash function.--has160β HAS-160: Select HAS-160 hash function.--snefru128,--snefru256β SNEFRU: Select SNEFRU-128/256 hash function.--edonr256,--edonr512β EDON-R: Select EDON-R 256/512 hash function.--blake2b,--blake2sβ BLAKE2: Select BLAKE2b/BLAKE2s hash function.--blake3β BLAKE3: Select BLAKE3 hash function.-a,--allβ Calculate all supported hash functions.--list-hashesβ List names of all supported hash functions, one per line.
π MISCELLANEOUS OPTIONS π
the rest of the toolbox, and yes, every single one matters. π
-r,--recursiveβ Recursively process directories, specified by command line. π³--followβ Follow symbolic links when processing files or directories recursively. π-m,--message=<text>β Calculate message digests of the given text message. π¬--file-list=<file>β Process given file as a file-list. Lines of this file are interpreted as paths to files to be processed. Multiple file lists can be specified at command line. π-v,--verboseβ Be verbose. π£οΈ--briefβ Print brief form of verification report (without a header and footer), when verifying a hash file. βοΈ-P,--percentsβ Show percents, while calculating or checking sums. π--skip-okβ Don't print OK messages for successfully verified files. π«β--ignore-missingβ Ignore missing files, while verifying a hash file. π«₯-i,--ignore-caseβ Ignore case of filenames when updating crc files. π--speedβ Print per-file and the total processing speed. ποΈ-e,--embed-crcβ Rename files by inserting crc32 sum into name. π·οΈ--embed-crc-delimiter=<delimiter>β Insert specified<delimiter>before a crc sum in the--embed-crcmode, default is white space. The<delimiter>can be a character or empty string. π--path-separator=<separator>β Use specified path separator to display paths. Only slash (/) and backslash (\) values are accepted. π£οΈ-q,--accept=<list>β Set a commaβdelimited list of extensions of the files to process. β--exclude=<list>β Set a commaβdelimited list of extensions of the files to exclude from processing. π«-t,--crc-accept=<list>β Set a commaβdelimited list of extensions of the hash files to verify. π--max-depth=<levels>β Descend at most<levels>(a nonβnegative integer) levels of directories below the command line arguments.--max-depth 0means only apply the tests and actions to the command line arguments. π-o,--output=<file-path>β Set the file to output calculated message digests or verification results to. π€-l,--log=<file-path>β Set the file to log errors and verbose information to. π--openssl=<list>β Specify which hash functions should be calculated using the OpenSSL library. The<list>is a comma delimited list of hash function names, but only those supported by openssl are allowed: md4, md5, sha1, sha2*, ripemd160 and whirlpool. π--gost-reverseβ Reverse bytes in hexadecimal output of a GOST hash functions. The most significant byte of the message digest will be printed first. Default order is the least significant byte first. π--bt-batch=<file-path>β Turn on torrent batch mode (implies torrent mode). Calculates batch-torrent for the files specified at command line and saves the torrent file to the file-path. The option-r <directory>can be useful in this mode. π¦--bt-privateβ Generate torrent file or BTIH for a private BitTorrent tracker. π--bt-transmissionβ Generate torrent file or BTIH compatible with Transmission torrent client. π--bt-piece-lengthβ Set the piece length value for torrent file. π§©--bt-announce=<announce-url>β Add a tracker announce URL to the created torrent file(s). Several URLs can be passed by specifying the option mutltiple times. This option doesn't change the BTIH message digest. π£--benchmark-rawβ Switch benchmark output format to be a machineβreadable tabβdelimited text with hash function name, speed, cpu clocks per byte. This option works only if the--benchmarkoption was specified. π€--no-detect-by-extβ Do not detect hash function by an extension of hash file, in the--checkmode. π«π--no-path-escapingβ Turn off escape characters in file paths. The option can be specified in the default, check or update modes. π§--(double dash) β Mark the end of command line options. All parameters following the double dash are interpreted as files or directories. It is typically used to process filenames starting with a dash-. Alternatively you can specify./or full path before such files, so they will not look like options anymore. π
π OUTPUT FORMAT OPTIONS π
Okay so this is the part where you pick how your hashes look when they come out. It's giving β¨aesthetic choicesβ¨ and honestly? Every single one is valid.
--sfvβ prints message digests in the SFV (Simple File Verification) output format, and yes bestie, this one's the default. But heads up β unlike a common SFV file, it's not just CRC32 here: any message digests you specified with options can get printed. We're flexible like that π-g,--magnetβ prints message digests formatted as magnet links π§² (iykyk)--bsdβ uses the BSD output format. Every message digest gets its own separate line, printed after the hash function name and the file's path, all wrapped up in parentheses π--simpleβ uses the simple output format. Each line is just the filename plus the message digests you asked for by options. No drama, no extras.--one-hashβ one message digest per line, and literally no extra file information. Just the hash, bestie, nothing else π¦-L,--ed2k-linkβ prints an eDonkey link containing the file name, the file size, and the ED2K and AICH message digests π΄--hexβ prints message digests in hexadecimal format--base32β prints message digests in Base32 format-b,--base64β prints message digests in Base64 format--uppercaseβ prints message digests in UPPER CASE π’--lowercaseβ prints message digests in lower case π€«--template=<file>β reads aprintfβlike template from the given<file>. Peep the--printfoption below for the deets π-p,--printf=<format>β the format string gets printed to standard output, and it interprets\escapes and%directives. Here's the whole menu of escapes and directives, bestie, don't skip any:\nβ Newline.\rβ Carriage return.\tβ Horizontal tab.\\β A literal backslash (\).\0β ASCII NUL.\NNNβ The character whose octal ASCII code isNNN.\xNNβ The character whose hexadecimal ASCII code isNN.- A
\character followed by any other character is treated as an ordinary character, so both of them get printed. %%β A literal percent sign.%pβ File's path.%fβ File's name.%dβ File's directory.%uor%Uβ A prefix used to print a filename, file path or base64/raw message digest as an URLβencoded string. For example:%up,%ud,%uf,%uBm,%u@h. Use%ufor lowercase and%Ufor uppercase hexadecimal characters.%sβ File's size in bytes.%{mtime}β File's last modification time.%aor%Aβ AICH message digest.%cor%Cβ CRC32 checksum. Use%cfor lowercase and%Cfor uppercase characters.%gor%Gβ GOST R 34.11-2012 256-bit message digest.%hor%Hβ SHA1 message digest.%eor%Eβ ED2K message digest.%lor%Lβ EDonkeyed2k://...link.%mor%Mβ MD5 message digest.%ror%Rβ RIPEMD-160 message digest.%tor%Tβ TTH message digest.%wor%Wβ Whirlpool message digest.%{crc32},%{crc32c},%{md4},%{md5},%{sha1},%{tiger},%{tth},%{btih},%{ed2k},%{aich},%{whirlpool},%{ripemd160},%{has160},%{gost94},%{gost94-cryptopro},%{gost12-256},%{gost12-512},%{sha-224},%{sha-256},%{sha-384},%{sha-512},%{sha3-224},%{sha3-256},%{sha3-384},%{sha3-512},%{edon-r256},%{edon-r512},%{blake2s},%{blake2b},%{blake3},%{snefru128},%{snefru256}β Print the specified message digest. It gets printed in uppercase if the hash function name starts with a capital letter, e.g.%{TTH},%{Sha-512}π%x<hash>,%b<hash>,%B<hash>,%@<hash>β Use one of these prefixes to output a message digest in hexadecimal, base32, base64 or raw (binary) format respectively, e.g.%b{md4},%BH,%xT.
And here's a lil plot twist: the default output format can also be changed by renaming the program, or by placing a hardlink/symlink to it with a filename that contains any of these strings: crc32, crc32c, md4, md5, sha1, sha224 sha256, sha384 sha512, sha3-256, sha3-512, sha3-224, sha3-384, tiger, tth, btih, aich, ed2k, ed2k-link, gost12-256, gost12-512, gost94, gost94-cryptopro, rmd160, has160, whirlpool, edonr256, edonr512, blake2s, blake2b, blake3, snefru128, snefru256, sfv , bsd or magnet. Naming your binary your whole personality? Slay, honestly π
πΈ CONFIG FILE πΈ
RHash goes looking for a config file in these spots, in this order of addresses: $XDG_CONFIG_HOME/rhash/rhashrc, $HOME/.config/rhash/rhashrc, $XDG_CONFIG_DIRS/rhash/rhashrc, $HOME/.rhashrc and /etc. It's giving "I checked everywhere for you, bestie" π«Ά
The config file is made of lines formatted like this:
variable = value
where variable can be the name of any command line option β like magnet, printf, percents, etc. A boolean variable can be set to true by a value of on, yes or true; any other value sets the variable to false. (Yes, it's that simple, no cap.)
Empty lines, plus lines starting with # or ;, are ignored. We love a clean file β¨
Example config file:
# This is a comment line
percents = on
crc-accept = .sfv,.md5,.sha1,.sha256,.sha512,.tth,.magnet
π AUTHOR π
Aleksey Kravchenko <rhash.admin@gmail.com> β the icon, the legend, the moment π
π SEE ALSO π
md5sum(1) cksfv(1) ed2k_hash(1)
π BUGS π
Bug reports are welcome! Post them to the GitHub issues page https://github.com/rhash/RHash/issues β go tell them everything, bestie, they genuinely wanna hear it π
and that's the whole page, bestie!! π β¨ This one's living on Linux, dated APR 2010, and its name is RHASH(1) β iconic, timeless, obsessed. Go hash something and make me proud ππ¦π
π¦ where this page comes from
- alpine 3.23: rhash-doc 1.4.6-r0 Β· 0BSD
- alpine 3.24: rhash-doc 1.4.6-r0 Β· 0BSD
- arch rolling: rhash 1.4.6-1 Β· 0BSD
- ubuntu questing: rhash 1.4.6-1
- ubuntu resolute: rhash 1.4.6-1.1 Β· 0BSD
- ubuntu stonking: rhash 1.4.6-1.1 Β· 0BSD
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms