RHash Manual
Table of Contents
rhash - calculate CRC32, MD5, SHA1, Tiger, TTH, eDonkey and other
hash sums.
rhash [ option ]... [ file ]...
RHash (Recursive
Hasher) computes various message digests of files. The message digests
include CRC32, MD4, MD5, SHA1, Tiger, DC++ TTH, AICH, eDonkey hash, GOST
R 34.11-94, RIPEMD-160, HAS-160, Whirlpool, Snefru-128 and Snefru-256.
The program
can compute Magnet links and eDonkey ed2k:// links.
By default rhash prints
sums in SFV format with CRC32 hash sum only. To output all sums -a option
should be specified.
Default output format can be changed by renaming the
program or placing a hardlink/symlink to it with a name containig strings
‘crc32’, ‘md4’, ‘md5’, ‘sha1’, ‘tiger’, ‘tth’, ‘aich’, ‘ed2k’, ‘ed2k-link’, ‘gost’, ‘ripemd160’,
‘has160’, ‘whirlpool’, ‘snefru128’, ‘snefru256’, ‘sfv’ or ‘magnet’.
The
default mode is to print hash sums for the files specified at command line.
It could be changed with the following options.
- -c, --check
- Check files with
hash sums specified by command line.
- -u, --update
- Update crc files specified
by command line. Hash sums will be calculated for all files from the same
directory which are not present in the given crc file.
- --check-embedded
- Verify
files by crc32 sum embedded in their names.
- -h, --help
- Help: print help screen
and exit.
- -V, --version
- Version: print version and exit.
- -B, --benchmark
- Run benchmark
for selected algorithm.
- -C, --crc32
- CRC32: calculate and print
CRC32 hash sum.
- -M, --md4
- MD4: calculate and print MD4 hash sum.
- -M, --md5
- MD5: calculate
and print MD5 hash sum.
- -H, --sha1
- SHA1: calculate and print SHA1 hash sum.
- -G,
--tiger
- Tiger: calculate and print Tiger hash sum.
- -T, --tth
- TTH: calculate and
print DC++ TTH sum.
- -A, --aich
- AICH: calculate and print AICH hash.
- -E, --ed2k
- ED2K:
calculate and print eDonkey 2000 hash sum.
- -L, --ed2k-link
- eDonkey link: calculate
and print eDonkey link. This option also switches default output format
to --simple.
- -W, --whirlpool
- Whirlpool: calculate and print Whirlpool hash sum.
- --gost
- GOST: calculate and print GOST R 34.11-94 hash. It’s the Russian GOST
standart hash function.
- --ripemd160
- RIPEMD-160: calculate and print RIPEMD-160
hash sum.
- --has160
- HAS-160: calculate and print HAS-160 hash sum.
- --snefru128
- SNEFRU-128:
calculate and print SNEFRU-128 hash sum.
- --snefru256
- SNEFRU-256: calculate and
print SNEFRU-256 hash sum.
- -a, --all
- Calculate all supported hash sums.
- -r, --recursive
- Process directories recursively.
- -v, --verbose
- Be verbose.
- --percents
- Show percents, while calculating or checking sums
- --skip-ok
- Don’t print
OK messages for successfully verified files.
- -i, --ignore-case
- Ignore case of
filenames when updating crc files.
- --speed
- Print per-file and total processing
speed.
- -e, --embed-crc
- Rename files by inserting crc32 sum into name.
- --embed-crc-delimiter=<delimeter>
- Insert
specified <delimeter> before a crc sum in the --embed-crc mode, default is
white space. The <delimeter> can be a character or empty string.
- -q, --accept=<list>
- Set
a comma-delimited list of extensions of the files to calculate sums for.
- -t, --crc-accept=<list>
- Comma-delimited list of crc files extensions.
- -m, --maxdepth=<levels>
- Descend
at most <levels> (a non-negative integer) levels of directories below the
command line arguments. ‘--maxdepth 0’ means only apply the tests and actions
to the command line arguments.
- -o, --output=<file>
- File to output calculated hash
sums or crc file checking results.
- -l, --log=<file>
- File to log errors and verbose
information.
- --sfv
- Print hash sums in the SFV (Simple
File Verification) output format (default). But unlike common SFV file,
not only CRC32, but any hash sums specified by options can be printed.
- --bsd
- Use BSD output format. Each hash sum is printed on separate line after
hash name and file’s path, enclosed in parentheses.
- --simple
- Use simple output
format. Each line will consist of filename and hash sums specified by options.
- --magnet
- Print hash sums formated as magnet links.
- --printf=<format>
- Format: print
format string the standard output, interpreting ‘\’ escapes and ‘%’ directives.
The escapes and directives are:
- \n
- Newline.
- \r
- Carriage return.
- \t
- Horizontal
tab.
- \\
- A literal backslash (‘\’).
- \NNN
- The character which octal ASCII code
is NNN.
- \xNN
- The character which hexadecimal ASCII code is NN.
A ‘\’ character
followed by any other character is treated as an ordinary character, so
they both are printed.
- %%
- A literal percent sign.
- %p
- File’s path.
- %f
- File’s name.
- %{urlname}
- URL-encoded filename.
- %s
- File’s size in bytes.
- %c or %C
- CRC32 hash
sum. Use %c for lowercase and %C for uppercase characters.
- %m or %M
- MD5 hash.
- %h or %H
- SHA1 hash.
- %g or %G
- Tiger hash.
- %t or %T
- TTH sum.
- %e or %E
- eDonkey hash
sum.
- %l or %L
- eDonkey ed2k://... link.
- %w or %W
- Whirlpool hash.
- %{md4}
- MD4 hash.
- %{ripemd160}
- RIPEMD-160 hash.
- %{gost}
- GOST R 34.11-94 hash.
- %{has160}
- HAS-160 hash.
- %{snefru128}
- Snefru-128 hash.
- %{snefru256}
- Snefru-256 hash.
- %h<hash-sum> or %b<hash-sum>
- Use
on of these two prefixes to output specified hash in hexadecimal or base-32
format respectively, e.g. %b{md4} or %bH.
RHash searches for
config file in the following order: the .rhashrc file in the current directory,
then ~/.rhashrc, and /etc/rhashrc.
The syntax of a config file line is
variable = value
where variables are the names of options, such as magnet,
printf, percents. Simple boolean values can be set using ‘1’, ‘on’ or ‘yes’.
Empty lines and all lines beginnig with ‘#’ or ‘;’ are disgarded.
Aleksey
Kravchenko <rhash.admin@gmail.com>
md5sum(1) cksfv(1) ed2k_hash(1)
Bug reports are welcome! Send them by email or post to SourceForge
Bug Tracking System http://sourceforge.net/projects/rhash/
Table of Contents
|