Skip to content

Commit

Permalink
b2sum, md5sum, sha*sum: add --ignore-missing example (#7929)
Browse files Browse the repository at this point in the history
  • Loading branch information
dotnetCarpenter committed Mar 28, 2022
1 parent 0bc72f5 commit b698969
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 11 deletions.
14 changes: 11 additions & 3 deletions pages/common/b2sum.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,18 @@

`b2sum {{path/to/file1}} {{path/to/file2}}`

- Calculate the BLAKE2 checksum from stdin:

`{{some_command}} | b2sum`

- Read a file of BLAKE2 sums and filenames and verify all files have matching checksums:

`b2sum -c {{path/to/file.b2}}`
`b2sum --check {{path/to/file.b2}}`

- Calculate the BLAKE2 checksum from stdin:
- Only show a message for missing files or when verification fails:

`{{some_command}} | b2sum`
`b2sum --check --quiet {{path/to/file.b2}}`

- Only show a message for files for which verification fails, ignoring missing files:

`b2sum --ignore-missing --check --quiet {{path/to/file.b2}}`
14 changes: 11 additions & 3 deletions pages/common/md5sum.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,18 @@

`md5sum {{path/to/file1}} {{path/to/filen2}}`

- Calculate a MD5 checksum from the standard input:

`echo "{{text}}" | md5sum`

- Read a file of MD5SUMs and verify all files have matching checksums:

`md5sum -c {{path/to/file.md5}}`
`md5sum --check {{path/to/file.md5}}`

- Calculate a MD5 checksum from the standard input:
- Only show a message for missing files or when verification fails:

`echo "{{text}}" | md5sum`
`md5sum --check --quiet {{path/to/file.md5}}`

- Only show a message for files for which verification fails, ignoring missing files:

`md5sum --ignore-missing --check --quiet {{path/to/file.md5}}`
6 changes: 5 additions & 1 deletion pages/common/sha1sum.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@

`sha1sum --check {{path/to/file.sha1}}`

- Only show a message for files for which verification fails:
- Only show a message for missing files or when verification fails:

`sha1sum --check --quiet {{path/to/file.sha1}}`

- Only show a message for files for which verification fails, ignoring missing files:

`sha1sum --ignore-missing --check --quiet {{path/to/file.sha1}}`
6 changes: 5 additions & 1 deletion pages/common/sha224sum.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@

`sha224sum --check {{path/to/file.sha224}}`

- Only show a message for files for which verification fails:
- Only show a message for missing files or when verification fails:

`sha224sum --check --quiet {{path/to/file.sha224}}`

- Only show a message for files for which verification fails, ignoring missing files:

`sha224sum --ignore-missing --check --quiet {{path/to/file.sha224}}`
6 changes: 5 additions & 1 deletion pages/common/sha256sum.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@

`sha256sum --check {{path/to/file.sha256}}`

- Only show a message for files for which verification fails:
- Only show a message for missing files or when verification fails:

`sha256sum --check --quiet {{path/to/file.sha256}}`

- Only show a message for files for which verification fails, ignoring missing files:

`sha256sum --ignore-missing --check --quiet {{path/to/file.sha256}}`
6 changes: 5 additions & 1 deletion pages/common/sha384sum.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@

`sha384sum --check {{path/to/file.sha384}}`

- Only show a message for files for which verification fails:
- Only show a message for missing files or when verification fails:

`sha384sum --check --quiet {{path/to/file.sha384}}`

- Only show a message for files for which verification fails, ignoring missing files:

`sha384sum --ignore-missing --check --quiet {{path/to/file.sha384}}`
6 changes: 5 additions & 1 deletion pages/common/sha512sum.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@

`sha512sum --check {{path/to/file.sha512}}`

- Only show a message for files for which verification fails:
- Only show a message for missing files or when verification fails:

`sha512sum --check --quiet {{path/to/file.sha512}}`

- Only show a message for files for which verification fails, ignoring missing files:

`sha512sum --ignore-missing --check --quiet {{path/to/file.sha512}}`

0 comments on commit b698969

Please sign in to comment.