md5sum
Linux · Files · reference only
What it does
Computes and verifies MD5 checksums, which are used to detect whether a file got corrupted or changed.
Syntax
md5sum [opciones] [fichero...]
Options and parameters
-cReads checksums from a file and checks that the listed files match.
--quietWith -c, does not print files that match; only the ones that fail.
--statusWith -c, prints nothing and reports the result only in the exit status.
--ignore-missingWith -c, does not fail for missing files.
--tagWrites the checksum in BSD format, with the algorithm name.
-bReads the file in binary mode.
Usage examples
md5sum archivo.isoPrints the file's MD5 checksum and its name.
md5sum a.txt b.txt > sumas.md5Saves the checksums of several files into a file.
md5sum -c sumas.md5Checks the files have not changed since the checksums were computed.
md5sum -c --quiet sumas.md5Same, but only warns about the ones that do not match.
Notes and common mistakes
- MD5 detects accidental damage, but it is not safe against deliberate tampering: use sha256sum for that.