mirror of
https://github.com/gnuton/asuswrt-merlin.ng.git
synced 2025-05-18 23:41:30 +02:00
19 lines
532 B
Perl
Executable file
19 lines
532 B
Perl
Executable file
#!/usr/bin/perl -w
|
|
use Digest::MD5;
|
|
|
|
if (@ARGV < 1) {
|
|
print STDERR "Usage: perlmd5kos dir [dir ...]\n";
|
|
exit 1;
|
|
}
|
|
|
|
open FIND,"find @ARGV -name \*.ko |";
|
|
while (<FIND>) {
|
|
chomp;
|
|
open(my $fh,'<',$_) or warn "open $_: $!\n" and next;
|
|
my $mtime = (stat($fh))[9];
|
|
my ($ss,$mm,$hh,$DD,$MM,$YY,undef,undef,undef) = gmtime($mtime);
|
|
printf "%s %s %4d-%02d-%02d %02d:%02d:%02d\n",
|
|
$_,Digest::MD5->new->addfile($fh)->hexdigest,
|
|
1900+$YY,1+$MM,$DD,$hh,$mm,$ss;
|
|
}
|
|
|