sha256sum
瑞兹 发表于 2020-12-04 13:20浏览次数:
在类似Unix的操作系统上,sha256sum命令计算并检查SHA256加密的消息摘要。
On Unix-like operating systems, the sha256sum command computes and checks a SHA256 encrypted message digest.
目录:
1 sha256sum 运行系统环境
2 sha256sum 描述
3 sha256sum 语法
4 sha256sum 例子
sha256sum 运行系统环境
sha256sum 描述
所述sha256sum命令显示或检查SHA256(256位)的校验和。如果没有FILE,或者当FILE为-(破折号)时,它将从标准输入读取摘要。
The sha256sum command displays or checks SHA256 (256-bit) checksums. With no FILE, or when FILE is - (a dash), it reads the digest from standard input.
sha256sum 语法
sha256sum [OPTION]... [FILE]...
选件
-b,--binary
|
以二进制模式读取。
|
-c,--check
|
从FILEs读取SHA256总和并进行检查。
|
--tag
|
创建一个BSD样式的校验和。
|
-t,--text
|
以文本模式读取(默认)。
|
Note
GNU系统上的二进制和文本模式选项之间没有区别。
以下四个选项仅在验证校验和时才有用:
--quiet
|
不要为每个成功通过验证的文件打印“确定”。
|
--status
|
什么都不输出,状态码显示成功。
|
--strict
|
对于格式不正确的校验和行,请退出非零值。
|
-w,--warn
|
警告格式不正确的校验和行。
|
--help
|
显示此帮助并退出。
|
--version
|
输出版本信息并退出。
|
如FIPS-180-2中所述计算总和。检查时,输入应为该程序的先前输出。默认模式是打印带有校验和的行,一个指示输入模式的字符('*'表示二进制,文本表示空格)以及每个FILE的名称。
sha256sum [OPTION]... [FILE]...
Options
-b, --binary
|
Read in binary mode.
|
-c, --check
|
Read SHA256 sums from the FILEs and check them.
|
--tag
|
Create a BSD-style checksum.
|
-t, --text
|
Read in text mode (default).
|
Note
There is no difference between binary and text mode option on GNU system.
The following four options are useful only when verifying checksums:
--quiet
|
Don't print OK for each successfully verified file.
|
--status
|
Don't output anything, status code shows success.
|
--strict
|
Exit non-zero for improperly formatted checksum lines.
|
-w, --warn
|
Warn about improperly formatted checksum lines.
|
--help
|
Display this help and exit.
|
--version
|
Output version information and exit.
|
The sums are computed as described in FIPS-180-2. 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 input mode ('*' for binary, space for text), and name for each FILE.
sha256sum 例子
sha256sum example.iso
运行上面的命令将在当前目录中提供example.iso文件的SHA256校验和。以下是一个完整的SHA256校验和后跟文件名的输出显示示例。
d14a028c2a3a2bc9476102bb288234c415a2b01f828ea62ac5b3e42f example.iso
sha256sum example.iso
Running the above command would give the SHA256 checksum of the example.iso file in the current directory. Below is an example of how the output may appear with the full SHA256 checksum followed by the file name.
d14a028c2a3a2bc9476102bb288234c415a2b01f828ea62ac5b3e42f example.iso