From e7ca620ed981d60d644e2f597a4093990bc17096 Mon Sep 17 00:00:00 2001 From: Alexandre ZANNI <16578570+noraj@users.noreply.github.com> Date: Thu, 30 Mar 2023 18:16:52 +0200 Subject: [PATCH] rhash: add page (#9973) * rhash: add new command --------- Co-authored-by: K.B.Dharun Krishna --- pages/common/rhash.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 pages/common/rhash.md diff --git a/pages/common/rhash.md b/pages/common/rhash.md new file mode 100644 index 000000000..e38d60ba8 --- /dev/null +++ b/pages/common/rhash.md @@ -0,0 +1,28 @@ +# rhash + +> Calculate or check common message digests. +> More information: . + +- Calculate default CRC32 digests of a file: + +`rhash {{path/to/file}}` + +- Recursively process a directory to generate an SFV file using SHA1: + +`rhash --sha1 --recursive {{path/to/folder}} > {{path/to/output.sfv}}` + +- Verify the integrity of files based on an SFV file: + +`rhash --check {{path/to/file.sfv}}` + +- Calculate the SHA3 digest of a text message: + +`rhash --sha3-256 --message '{{message}}'` + +- Calculate CRC32 digest of a file and output digest encoded in base64 using BSD format: + +`rhash --base64 --bsd {{path/to/file}}` + +- Use custom output template: + +`rhash --printf '{{%p\t%s\t%{mtime}\t%m\n}}' {{path/to/file}}`