Имеется скрипт, написанный на перле:
#!/usr/bin/perl
#
# checkem.pl
#
# Simple perl file stats and md5 checksum printer.
#
# checkem.pl directory [directory ..]
#
# We suggest you send the output to a file and
# compare with previous runs using 'diff.'
#
# Or, better yet, use a real File Integrity
# Tool such as Aide.
#
# Copyright 2001, Bri Hatch
# Released under GPL
use MD5;
require 'find.pl';
$md5=new MD5;
@dirs = @ARGV;
for $dir ( @dirs ) { find($dir); }
sub wanted { push @files, $name; } # This subroutine is called
# for each file found
for $name ( sort @files ) {
($uid,$gid) = (stat $name)[4,5];
$stat = sprintf "%0o", (stat _)[2];
unless ( -f $name ) {
printf "$stat\t$uid $gid\t\t\t\t\t$name\n";
next;
} # abort here if not a 'plain' file
# Do a checksum
$md5->reset();
open FILE, $name or print(STDERR "Can't open file $name\n"), next;
$md5->addfile(FILE);
close FILE;
$checksum = $md5->hexdigest();
printf "$stat\t$uid $gid $checksum\t$name\n";
}
Can't locate find.pl in @INC (@INC contains: /etc/perl /usr/local/lib64/perl5/5.20.2/x86_64-linux /usr/local/lib64/perl5/5.20.2 /usr/lib64/perl5/vendor_perl/5.20.2/x86_64-linux /usr/lib64/perl5/vendor_perl/5.20.2 /usr/local/lib64/perl5 /usr/lib64/perl5/vendor_perl /usr/lib64/perl5/5.20.2/x86_64-linux /usr/lib64/perl5/5.20.2 .) at ./checkem.pl line 19.
require 'find.pl';
Вначале ругался на MD5, после установки dev-perl/MD5 перестал. После установки dev-perl/Module-Find не перестал. ЧЯДНТ