Just a sample of the Echomail archive
[ << oldest | < older | list | newer > | newest >> ]
|  Message 437  |
|  mark lewis to Tony Langdon  |
|  CRC32  |
|  01 Oct 16 10:27:34  |
 
01 Oct 16 22:04, you wrote to Maurice Kinal:
MK>> The rest looks doable with what I have at hand and strongly suspect
MK>> that all/most linux distributions also. I'd imagine the Husky people
MK>> probably have an agreeable method somewhere in their sources. Also,
MK>> also the perl idea looks to be a possibilty but I for one would like
MK>> to see a oneliner, as well as verification as to compatibilty, before
MK>> adding that module to the onboard perl here given the limited usuage
MK>> it will see <- most likely zero.
TL> I'd br hsppy to use the Perl option, if I could find it for Raspian. :)
as i understand it, Archive::Zip is available... i would expect to find it on
CPAN... from what i understand, it is what brings crc32 to the table... in
fact, i just took a peek at it...
==== Begin "crc32" ====
#!/usr/bin/perl
eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
# Computes and prints to stdout the CRC-32 values of the given files
use strict;
use lib qw( blib/lib lib );
use Archive::Zip;
use FileHandle;
my $totalFiles = scalar(@ARGV);
foreach my $file (@ARGV) {
if ( -d $file ) {
warn "$0: ${file}: Is a directory\n";
next;
}
my $fh = FileHandle->new();
if ( !$fh->open( $file, 'r' ) ) {
warn "$0: $!\n";
next;
}
binmode($fh);
my $buffer;
my $bytesRead;
my $crc = 0;
while ( $bytesRead = $fh->read( $buffer, 32768 ) ) {
$crc = Archive::Zip::computeCRC32( $buffer, $crc );
}
printf( "%08x", $crc );
print("\t$file") if ( $totalFiles > 1 );
print("\n");
}
==== End "crc32" ====
cksum, on the other hand...
cksum: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically
linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=7
63f0944bd950d5e1ea144aaa1c5be5d3d41d4a, stripped
MK>> Speaking for myself I'd prefer md5sum for file tranfer verification.
MK>> From my limited usuage thus far it has proved itself to be an
MK>> excellent strategy with 100% track record thus far but none of it has
MK>> anything to do with fidonet and especially not DOS which became
MK>> abandonware here somewhere around 1995-ish which was one of the
MK>> samrtest decisions made, next to the idea of, "I don't do windows."
MK>> :::evil grin:::
TL> If it was a simply matter of doing it for my purposes, md5sum would be
TL> the go, but we have to work with the TIC specs here. ;)
the specs won't be updated until the new feature is in widespread use... i
don't recall if md5 has been seen in any TIC files but the spec should
indicate what to do with unknown options... following existing design, you
could add md5... i would use both for some time until md5 caught on...
)\/(ark
Always Mount a Scratch Monkey
Do you manage your own servers? If you are not running an IDS/IPS yer doin' it
wrong...
... Not sure where the cow is, but you came to the right place for bull.
---
* Origin: (1:3634/12.73)
|
[ << oldest | < older | list | newer > | newest >> ]