![Forrest logo](/images/logo.png)
md5sum:tldr:743d5
The command md5sum --check ${filename-md5}
is used to verify the integrity of a file by comparing its MD5 checksum value with the one stored in a separate file.
Here's what each part of the command does:
-
md5sum
: It is a command-line utility used to calculate and display the MD5 checksum (a unique cryptographic hash value) of a file. The MD5 checksum is a 32-character string that represents the file's contents. -
--check
: This option is used to compare MD5 checksum values. It allows you to verify if the calculated MD5 checksum matches a given value. -
${filename-md5}
: This represents the name of the file containing the MD5 checksum value, usually stored in a separate file. You need to replace${filename-md5}
with the actual filename or path to the file.
To use this command, you typically perform the following steps:
-
Generate the MD5 checksum of the file you want to verify using the
md5sum
command:md5sum <file>
. -
Save the calculated MD5 checksum value in a separate file, which could be named something like
filename.md5
. -
Use the
md5sum --check
command with the path to the MD5 checksum file:md5sum --check filename.md5
.
The command will compare the calculated MD5 checksum with the one stored in filename.md5
and display whether they match or not. If they match, it indicates that the file has not been modified or corrupted. If they don't match, it signifies that the file has been altered or corrupted in some way.