Forrest logo
back to the b2sum tool

b2sum:tldr:cd88f

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

This command is used to check the integrity of a file using the b2sum hash function. Here is an explanation of each part of the command:

  • b2sum: This is the command-line tool that calculates the b2sum hash (also known as BLAKE2) of a file.

  • --ignore-missing: This flag tells the command to ignore missing files. If the specified file doesn't exist, it won't raise an error and will move on to the next file.

  • --check: This flag instructs the command to verify the hash of the specified file(s).

  • --quiet: This option enables quiet mode, meaning that it will suppress any output except for error messages. This is useful when you only want to check the validity of the file without any additional information.

  • ${filename-b2}: This is a parameter that represents the filename to be checked. ${filename-b2} is a form of parameter expansion that assigns the value of the variable filename to ${filename-b2} if filename is set, otherwise it assigns the value "b2" to ${filename-b2}. So, the file to be checked will be either the value of filename or "b2" if filename is not set.

Overall, this command checks the integrity of the specified file using b2sum, while ignoring missing files, and provides a quiet output.

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