2014-02-10 23:44:02 +00:00
|
|
|
# md5sum
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
> Calculate MD5 cryptographic checksums.
|
2021-04-01 16:54:26 +01:00
|
|
|
> More information: <https://www.gnu.org/software/coreutils/md5sum>.
|
2014-02-10 23:44:02 +00:00
|
|
|
|
2023-05-19 10:34:36 +01:00
|
|
|
- Calculate the MD5 checksum for one or more files:
|
2014-02-10 23:44:02 +00:00
|
|
|
|
2023-05-19 10:34:36 +01:00
|
|
|
`md5sum {{path/to/file1 path/to/file2 ...}}`
|
2016-01-20 11:45:42 +00:00
|
|
|
|
2023-05-19 10:34:36 +01:00
|
|
|
- Calculate and save the list of MD5 checksums to a file:
|
2016-01-20 11:45:42 +00:00
|
|
|
|
2023-05-19 10:34:36 +01:00
|
|
|
`md5sum {{path/to/file1 path/to/file2 ...}} > {{path/to/file.md5}}`
|
2014-02-10 23:44:02 +00:00
|
|
|
|
2023-05-01 06:52:12 +01:00
|
|
|
- Calculate an MD5 checksum from `stdin`:
|
2022-03-28 15:21:41 +01:00
|
|
|
|
2023-05-20 03:11:11 +01:00
|
|
|
`{{command}} | md5sum`
|
2022-03-28 15:21:41 +01:00
|
|
|
|
2023-05-19 10:34:36 +01:00
|
|
|
- Read a file of MD5 sums and filenames and verify all files have matching checksums:
|
2014-02-10 23:44:02 +00:00
|
|
|
|
2022-03-28 15:21:41 +01:00
|
|
|
`md5sum --check {{path/to/file.md5}}`
|
2020-10-28 17:46:25 +00:00
|
|
|
|
2022-03-28 15:21:41 +01:00
|
|
|
- Only show a message for missing files or when verification fails:
|
2020-10-28 17:46:25 +00:00
|
|
|
|
2022-03-28 15:21:41 +01:00
|
|
|
`md5sum --check --quiet {{path/to/file.md5}}`
|
|
|
|
|
2023-05-19 10:34:36 +01:00
|
|
|
- Only show a message when verification fails, ignoring missing files:
|
2022-03-28 15:21:41 +01:00
|
|
|
|
|
|
|
`md5sum --ignore-missing --check --quiet {{path/to/file.md5}}`
|