Forrest logo
back to the shasum tool

shasum:tldr:bd1c6

shasum: Calculate the SHA256 checksum for one or more files.
$ shasum --algorithm 256 ${filename1 filename2 ---}
try on your machine

The command "shasum" is used to compute the SHA checksum (or hash) of one or more files. The checksum is a unique alphanumeric string that represents the content of a file.

In this specific command, the "--algorithm 256" flag is provided to specify the SHA-256 algorithm, which is used to calculate the checksum.

"${filename1 filename2 ---}" indicates a placeholder where you should specify the filenames or paths of the files you want to calculate the SHA-256 checksum for. You can provide one or more filenames or paths, separated by spaces.

For example, if you want to calculate the SHA-256 checksum for two files named "file1.txt" and "file2.txt," you would execute the command as follows:

shasum --algorithm 256 file1.txt file2.txt

The command will then display the computed SHA-256 checksums for each file.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the shasum tool