不同的参考书使用的术语有所不同:
场景:
-----工具使用举例--------(MD5,SHA-1,SHA-256,SHA-512等等使用方法相同)
MD5SUM(1) User Commands MD5SUM(1)
Usage: md5sum [OPTION]... [FILE]...
compute and check MD5 (128-bit) message digest
1.打印(计算)MD5(128位)校验和
2.检查MD5(128位)校验和
With no FILE, or when FILE is -, read standard input. 如果没有FILE或者FILE为‘-’,将从标准输入读入
-b, --binary read in binary mode 以二进制模式读入
-c, --check read MD5 sums from the FILEs and check them 从FILES读取MD5 sums,然后校验他们
-t, --text read in text mode (default) 以文本模式读入(默认)
Note: There is no difference between binary and text mode option on GNU system.
提示: 如果在GUN 系统上,binary和text模式无任何区别。
---------------------------------------
The following three options are useful only when verifying checksums: 仅仅当查证校验和的时候,下面3个选项非常有用!
--quiet don't print OK for each successfully verified file 被查证的文件如果成功,不打印OK(即仅仅显示错误信息,屏蔽验证正确的文件)
--status don't output anything, status code shows success 不输入任何东西,状态码显示success (即无论正确与否,都不输出任何信息,echo $?看最后结果)
-w, --warn warn about improperly formatted checksum lines 关于非合法的格式的checksum行,抛出warning,如此之外,不予显示
--help display this help and exit
--version output version information and exit
The sums are computed as described in RFC 1321. When checking, the input
should be a former output of this program. 当检查时,输入的应该是之前程序的输出。
The default mode is to print a line with checksum, a character indicating type a character indi-cating type (‘*’ for binary, ‘ ’ for text), and name for each FILE.
默认的mode和checksum合并为一行打印,一个字符指出mode的类型(* 为二进制,空为text),每个FILE为name
Report md5sum bugs to bug-coreutils@gnu.org
GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
General help using GNU software: <http://www.gnu.org/gethelp/>
For complete documentation, run: info coreutils 'md5sum invocation'
PS:
$ openssl dgst -md5 test.enc
MD5(test.enc)= 9a8ca202880547463da5796c6d29f611
$ md5sum test.enc
9a8ca202880547463da5796c6d29f611 test.enc