From 6b22377b16dd9aad98887095d2fa199f71bd1f35 Mon Sep 17 00:00:00 2001 From: Heuzef Date: Wed, 25 Sep 2019 17:28:32 +0200 Subject: [PATCH] Find files --- backuppc_check.pl | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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");