|
|
|
@ -2,12 +2,15 @@ |
|
|
|
|
|
|
|
|
|
use lib "/usr/share/BackupPC/lib"; |
|
|
|
|
use BackupPC::Lib; |
|
|
|
|
use BackupPC::CGI::Lib qw(:all); |
|
|
|
|
use BackupPC::View; |
|
|
|
|
use BackupPC::XS qw(:all); |
|
|
|
|
use Encode qw/decode_utf8/; |
|
|
|
|
use POSIX; |
|
|
|
|
use JSON; |
|
|
|
|
use Getopt::Long; |
|
|
|
|
use Statistics::Descriptive; |
|
|
|
|
use Data::Dumper; |
|
|
|
|
use File::Find; |
|
|
|
|
|
|
|
|
|
my $host = undef; |
|
|
|
|
|
|
|
|
@ -119,19 +122,7 @@ print("Random file : "); |
|
|
|
|
|
|
|
|
|
print("Random file"); |
|
|
|
|
print("\n"); |
|
|
|
|
my $last_full_path = "/var/lib/BackupPC/pc/$host/$last_full_num/"; |
|
|
|
|
|
|
|
|
|
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"); |
|
|
|
|
|
|
|
|
|