shasum
Shasum is a command line tool used for generating and verifying checksums of files using various hash algorithms. The primary purpose of shasum is to ensure the integrity and authenticity of files by comparing the checksums before and after any data transfer or storage. It supports several widely used hash algorithms such as SHA-1, SHA-256, SHA-512, and MD5, among others. By default, shasum calculates the SHA-1 hash of a file, but this can be changed using command-line options. The output of shasum is a checksum hash, typically represented as a hexadecimal string. To verify the integrity of a file, the generated checksum can be compared with the original checksum. If the checksums match, it indicates that the file has not been altered or corrupted during the transfer or storage process. Shasum is widely used in the software distribution industry to ensure the authenticity and integrity of downloaded files. It is often included in security protocols and software verification processes. Shasum is available as a command-line tool on Unix-like operating systems, including macOS and Linux.
List of commands for shasum:
-
shasum:tldr:11563 shasum: Only show a message for missing files or when verification fails.$ shasum --check --quiet ${filename}try on your machineexplain this command
-
shasum:tldr:19e9c shasum: Only show a message when verification fails, ignoring missing files.$ shasum --ignore-missing --check --quiet ${filename}try on your machineexplain this command
-
shasum:tldr:6b137 shasum: Calculate the SHA512 checksum for one or more files.$ shasum --algorithm 512 ${filename1 filename2 ---}try on your machineexplain this command
-
shasum:tldr:76734 shasum: Calculate the SHA1 checksum for one or more files.$ shasum ${filename1 filename2 ---}try on your machineexplain this command
-
shasum:tldr:78db0 shasum: Calculate and save the list of SHA256 checksums to a file.$ shasum --algorithm 256 ${filename1 filename2 ---} > ${filename-sha256}try on your machineexplain this command
-
shasum:tldr:b507d shasum: Read a file of SHA1 sums and filenames and verify all files have matching checksums.$ shasum --check ${filename}try on your machineexplain this command
-
shasum:tldr:bd1c6 shasum: Calculate the SHA256 checksum for one or more files.$ shasum --algorithm 256 ${filename1 filename2 ---}try on your machineexplain this command