in reply to MD5 and SHA Hashes

What have you tried? What worked? What didn't? Effort is appreciated. See How do I post a question effectively?.

Using Digest::MD5 or Digest::SHA in a one-liner makes this fairly trivial:

perl -MDigest::MD5=md5_hex -n0777e 'printf "%s\t%s\n", $ARGV, md5_hex +$_' * > file.log
where you should probably swap the wildcard to the right one for your directory, and may choke on your file list depending on your shell.

#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.

Replies are listed 'Best First'.
Re^2: MD5 and SHA Hashes
by AppleFritter (Vicar) on Sep 03, 2014 at 10:32 UTC

    You don't even need Perl for this:

    $ md5sum * >md5sums.txt

    Substitute sha1sum (or any member of the sha*sum family) for md5sum as desired.