Md5sum: Difference between revisions

From Leo's Notes
This page was last edited on 14 June 2020, at 21:51.
Created page with " Since FreeBSD does not have <code>md5sum</code> by default, to do md5sum checks, either do a diff against the checksum file: md5 * | diff /path/to/md5.checksum - Or use a ..."
 
mNo edit summary
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Installation ==
=== FreeBSD ===
FreeBSD does have a {{code|md5sum}} utility, but it's named {{code|gmd5sum}}. Hint: the 'g' is for GNU. Build it from ports.


Since FreeBSD does not have <code>md5sum</code> by default, to do md5sum checks, either do a diff against the checksum file:
=== Linux ===
The GNU md5sum utility should be installed as it is part of {{code|coreutils}}.


md5 * | diff /path/to/md5.checksum -
== Usage ==


Or use a script like http://www.daemonforums.org/showthread.php?t=4202
To {{code|md5sum}} files recursively, run:
<syntaxhighlight lang="bash" line start="1" enclose="div">
find ./target -type f -exec md5sum {} \;>> /checksum.md5
</syntaxhighlight>
 
To verify files from a checksum file, run:
<syntaxhighlight lang="bash" line start="1" enclose="div">
md5sum -c /checksum.md5
</syntaxhighlight>


[[Category:FreeBSD]]
[[Category:FreeBSD]]
{{Navbox Linux}}[[Category:Linux]]
[[Category:LinuxUtilities]]

Latest revision as of 21:51, 14 June 2020

Installation

FreeBSD

FreeBSD does have a md5sum utility, but it's named gmd5sum. Hint: the 'g' is for GNU. Build it from ports.

Linux

The GNU md5sum utility should be installed as it is part of coreutils.

Usage

To md5sum files recursively, run:

 find ./target -type f -exec md5sum {} \;>> /checksum.md5

To verify files from a checksum file, run:

 md5sum -c /checksum.md5