Forrest logo
back to the sha256sum tool

sha256sum:tldr:895d7

sha256sum: Only show a message when verification fails, ignoring missing files.
$ sha256sum --ignore-missing --check --quiet ${filename-sha256}
try on your machine

The given command is used to perform an integrity check on a file with SHA-256 hashing algorithm. Let's break down each component:

  • sha256sum: It is the command to calculate the SHA-256 hash value of a file.
  • --ignore-missing: This option tells the command to ignore files that are missing or cannot be found. In case the file mentioned is not found, the command will not display an error.
  • --check: This option is used to check the integrity of one or more files using their hash values.
  • --quiet: This option makes the command operate silently, without displaying any output unless there is an error.
  • ${filename-sha256}: This is a shell variable that represents the name of the file along with its corresponding SHA-256 hash value. It is substituted with the actual file name and hash value at runtime.

Overall, this command will calculate the SHA-256 hash value of the specified file and then compare it with the provided hash value. If the calculated hash matches the provided one, the command will not display any output. Otherwise, it will indicate that the file has been tampered with or corrupted.

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