This morning when I went into work I explained my problem to Brad who suggested that I investigate if the find command would be of any use. Indeed, this was great advice and probably explains why there isn't a ready app in OS X to do it - essentially this functionality is built in!
find * -iname '*.dv' -exec md5 '{}' \; >output.txtThe above command will find all files that match "*.dv" (i.e. any file with an extension of dv) in the current directory and below, and then produce an MD5 hash of that file. It will then output the list of all the md5s to a file called output.txt.
So, basically if you are ever looking for a program where you can drop a folder into it to check and include subfolders to do a particular activity (and you're not afraid to use the command line), you can adapt the technique above by changing the md5 command to any other command.
Epilogue: I originally wrote this post when I was using OSX Leopard, but it also works in Snow Leopard, Lion and Mountain Lion and indeed should work with any flavour of OSX.
Excellent. Was having issues trying to force feed md5 from ls and grep. Works in Lion 10.7 (still) as well.
ReplyDeleteThank you! I was trying to find a way to generate a hash file for all my backup files, as I do with md5summer. This helped me a lot!
ReplyDelete