Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

alex_free

macrumors 65816
Original poster
Feb 24, 2020
1,060
2,245
This was something I put together as a small side project. Some modern file systems checksum the files in them to verify their integrity, I wanted something similar for my my main server, the Mac mini G4. So here’s what I did:


MD5VS makes it easy to verify the integrety of all files recursively in a specfied directory. MD5VS is very portable, it can use the BSD MD5 which comes with Mac OS X by default or the GNU MD5SUM which is on Linux and other systems, which is detected automatically.

Example:

Use the command:

./md5vs -c "/path/to/some/directoy"

This will create a file "/path/to/some/directory/md5sum.txt" which contains the md5sums of all files within "/path/to/some/directory" recursively.

Use the command:

./md5vs -v "/path/to/some/directory"

This will verify that the md5sums in all of the files within "/path/to/some/directory" recursively match what was previously recorded in the file "/path/to/some/directory/md5sum.txt" with the previous command: ./md5vs -c "/path/to/some/directory"

MD5VS is released into the public domain, see the file 'unlicense.txt'.

This was really just a fun thing to do in bash, however I could see it being useful to more then just me so I figured I would post it here. Tested on Mac OS X 10.4 and Fedora 33.
 
Last edited:

Jubadub

macrumors 6502
Nov 1, 2017
342
425
Does it take resource/data/etc. forks into account for the sum, or just the data fork? Or are sums listed for each fork separately?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.