summaryrefslogtreecommitdiffstats
path: root/move
diff options
context:
space:
mode:
Diffstat (limited to 'move')
-rwxr-xr-xmove/tools/nfs-accesses7
1 files changed, 7 insertions, 0 deletions
diff --git a/move/tools/nfs-accesses b/move/tools/nfs-accesses
index fed4aa181..f27de0d37 100755
--- a/move/tools/nfs-accesses
+++ b/move/tools/nfs-accesses
@@ -13,6 +13,7 @@ GetOptions('no-link' => \ (my $no_link),
'log-file=s' => \$log_file,
'first-file=s' => \ (my $first_file),
'from-time=s', => \ (my $from_time),
+ 'already-have=s', \ (my $already_have),
);
my @skipped_dirs = (
@@ -30,6 +31,10 @@ if ($full_dirs) {
my @l = chomp_(map { MDK::Common::File::cat_or_die($_) } split(' ', $full_dirs));
$full_dirs = '/tmp/live_tree(' . join('|', map { quotemeta } @l) . ')/';
}
+if ($already_have) {
+ my @l = map { chomp_(MDK::Common::File::cat_or_die($_)) } split(' ', $already_have);
+ $already_have = '(' . join('|', map { quotemeta } @l) . ')';
+}
open(my $F, "tac $log_file |");
@@ -48,6 +53,8 @@ while (<$F>) {
last if $file =~ m!/tmp/live_tree/move/(devices|symlinks)!;
last if $from_time && $time le $from_time;
+ $already_have && $file =~ /^$already_have$/ and next;
+
if ($file !~ /^$skipped_dirs/) {
if (-l $file ? !$no_link : -d $file ? !$no_dir : 1) {
my $s = $full_dirs && $file =~ /^$full_dirs/ ? "/tmp/live_tree$1" : $file;