MacOSでVM構築する為にISOイメージをダウンロード後に正しくダウンロードされたか確認する為、
チェックサムを利用する際に利用するコマンド shasum
ISOイメージダウンロード後次のコマンドを実行し、SHA-256チェックサムでダウンロードが正常に終了しているかを確認する。
$ shasum -a 256 rhel-server-6.7-x86_64-dvd.iso
0e0acb2a544f4d58f10292144161f40439734c6e98b13ba8c595372b20354bc5 rhel-server-6.7-x86_64-dvd.iso
shasum の ヘルプは以下のコマンドで確認可能
$ shasum --help
Usage: shasum [OPTION]... [FILE]...
Print or check SHA checksums.
With no FILE, or when FILE is -, read standard input.
-a, --algorithm 1 (default), 224, 256, 384, 512, 512224, 512256
-b, --binary read in binary mode
-c, --check read SHA sums from the FILEs and check them
-t, --text read in text mode (default)
-p, --portable read in portable mode
produces same digest on Windows/Unix/Mac
-0, --01 read in BITS mode
ASCII '0' interpreted as 0-bit,
ASCII '1' interpreted as 1-bit,
all other characters ignored
The following two options are useful only when verifying checksums:
-s, --status don't output anything, status code shows success
-w, --warn warn about improperly formatted checksum lines
-h, --help display this help and exit
-v, --version output version information and exit
When verifying SHA-512/224 or SHA-512/256 checksums, indicate the
algorithm explicitly using the -a option, e.g.
shasum -a 512224 -c checksumfile
The sums are computed as described in FIPS-180-4. 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 (*' for binary,
' for text, ?' for portable,
^' for BITS), and name for each FILE.
Report shasum bugs to mshelor@cpan.org