Linux command
sha512sum 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Calculate the SHA512 checksum
sha512sum [path/to/file]
Calculate checksums for multiple files
sha512sum [file1] [file2] [file3]
Calculate and save checksums
sha512sum [*.iso] > [checksums.sha512]
Verify checksums
sha512sum -c [checksums.sha512]
Verify silently
sha512sum -c --quiet [checksums.sha512]
Read from stdin
echo -n "[text]" | sha512sum
说明
sha512sum computes and verifies SHA512 (512-bit) message digests as described in FIPS-180-2. It generates a 128-character hexadecimal hash for file contents, providing strong integrity verification. With no FILE argument or when FILE is -, sha512sum reads from standard input. Output format is: checksum, space, mode indicator (* for binary, space for text), and filename. SHA512 provides stronger security than SHA1 or MD5 and is suitable for cryptographic applications. There is no difference between binary and text mode on GNU systems.
参数
- -b, --binary
- Read in binary mode
- -c, --check
- Read checksums from FILEs and verify them
- -t, --text
- Read in text mode (default)
- --tag
- Create a BSD-style checksum output
- -z, --zero
- End each output line with NUL instead of newline
- --ignore-missing
- Don't fail for missing files when checking
- --quiet
- Don't print OK for each successfully verified file
- --status
- Don't output anything; use exit status for result
- --strict
- Exit non-zero for improperly formatted checksum lines
- -w, --warn
- Warn about improperly formatted checksum lines
FAQ
What is the sha512sum command used for?
sha512sum computes and verifies SHA512 (512-bit) message digests as described in FIPS-180-2. It generates a 128-character hexadecimal hash for file contents, providing strong integrity verification. With no FILE argument or when FILE is -, sha512sum reads from standard input. Output format is: checksum, space, mode indicator (* for binary, space for text), and filename. SHA512 provides stronger security than SHA1 or MD5 and is suitable for cryptographic applications. There is no difference between binary and text mode on GNU systems.
How do I run a basic sha512sum example?
Run `sha512sum [path/to/file]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -b, --binary do in sha512sum?
Read in binary mode