diff --git a/backuppc_check.pl b/backuppc_check.pl index 6a374c4..dac94be 100644 --- a/backuppc_check.pl +++ b/backuppc_check.pl @@ -7,6 +7,7 @@ use JSON; use Getopt::Long; use Statistics::Descriptive; use Data::Dumper; +use File::Find; my $host = undef; @@ -119,7 +120,18 @@ print("Random file : "); print("Random file"); print("\n"); my $last_full_path = "/var/lib/BackupPC/pc/$host/$last_full_num/"; -print("last_full_path : $last_full_path"); + +my @files; +finddepth(\&wanted, $last_full_path); + +foreach my $file ( @files ) { + print("$file\n"); + } + +sub wanted { + push @files, $File::Find::name; + return; +}; print("\n----------------\n");