From 9a39d50440c71c76858fc05eeaf5233f6a66d761 Mon Sep 17 00:00:00 2001 From: Ole Tange Date: Sun, 29 Dec 2024 16:22:50 +0100 Subject: [PATCH] rrm: Progress info when checksumming. --- rrm/rrm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rrm/rrm b/rrm/rrm index f90e30a..60a52a2 100755 --- a/rrm/rrm +++ b/rrm/rrm @@ -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);