Just for fun I whipped up a perl script that will generate MD5SUMs of all the files in a compressed tar archive:
Code:
#!/usr/bin/perl -w
# vim: ts=8 sts=4 sw=4 et :
use strict;
use warnings;
# Generate MD5SUMS for files within a compressed tar archive.
# G. Margo 2011-07-22
#
# Usage: tar_sum.pl tarfilename
use Archive::Tar;
use Digest::MD5 qw(md5_hex);
my $filename = $ARGV[0];
die("File not found") unless -f $filename;
my $iter = Archive::Tar->iter($filename, 1, {limit => 1});
while(my $f = $iter->())
{
next unless $f->is_file;
print md5_hex($f->get_content)." *".$f->name."\n";
}
exit 0;
Bookmarks