#! /usr/bin/perl -W # # So if you need to force a retransmit of a file in your fs by your clients # you can (slightly) increase the mtime (given --size-only isn't used on the # other side...). You should also exclude updates to the given file on the # server-rsync (until all clients have retransmitted the files). # use strict; foreach my $f (@ARGV) { my @s = stat($f); if (!@s) { print STDERR "warning: no $f: $!\n"; next; } my $mt = $s[9] + 1; print "Bumping mtime of $f (+1 sec) to $mt\n"; system("touch -m -d \@$mt $f"); }