Am 11.02.2023 um 16:36 teilte Andreas Fett mit:
Moin,
Den Match für den Filenamen bekommste selber hin :-)
Habe mich schwer getan, aber ich denke ich habs. Bin halt kein
Programmierer. Hier nur der Teil, den ich geändert habe.
my $touchfile = '/var/log/icinga/Log_stamp';
my $touchstat = stat($touchfile) or die "No $touchfile: $!";
my $filePattern = 'Name_[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]_.*\.log$' ;
my @files = ();
my $wanted = sub {
my $stat = stat($_);
return unless -f $stat;
return unless $stat->mtime > $touchstat->mtime;
return unless /$filePattern/;
push @files, $File::Find::name;
};
find($wanted, glob("/var/log/icinga/logs"));
Danke,
Hilmar
--
sigfault