rrm: Progress info when checksumming.

This commit is contained in:
Ole Tange 2024-12-29 16:22:50 +01:00
parent 02896e1eb7
commit 9a39d50440

View file

@ -55,6 +55,8 @@ use Digest::SHA;
my %size;
my %hashval;
my @remove;
my $t = 1;
my $totalfiles = @ARGV;
for my $file (@ARGV) {
if(not -e $file) {
warn("File does not exist: $file");
@ -64,6 +66,7 @@ for my $file (@ARGV) {
warn("Not a file: $file");
next;
}
printf("[%d/%d] %s\n", $t++, $totalfiles, $file);
if(-s $file > 0) {
$size{$file} = -s $file;
my $sha = Digest::SHA->new(256);