Forrest logo
back to the sha256sum tool

sha256sum:tldr:01d59

sha256sum: Calculate and save the list of SHA256 checksums to a file.
$ sha256sum ${filename1 filename2 ---} > ${filename-sha256}
try on your machine

This command calculates the SHA256 checksum for one or more files and redirects the output to a file.

  • sha256sum: This is the name of the command-line utility used to calculate the SHA256 checksum.
  • ${filename1 filename2 ---}: This part specifies the filenames for which you want to calculate the checksum. You can provide multiple filenames separated by spaces. The --- is used to indicate the end of filenames, in case any filenames start with a hyphen -.
  • >: This is the output redirection operator, used to redirect the command's output to a file instead of printing it to the terminal.
  • ${filename-sha256}: This is the name you want to give to the file where the checksum will be stored. It could be any desired filename, but in this case, it suggests using the original filename with -sha256 appended.

Putting it all together, when you run this command, it will calculate the SHA256 checksum for the specified file(s) and save the output (the checksum) to a file with a name that includes the original filename and -sha256.

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 sha256sum tool