/usr/share/rsync/scripts
NameSizeModeActions
atomic-rsync51900755editdlrm
cull-options49020755editdlrm
cvs2includes12120755editdlrm
file-attr-restore49320755editdlrm
files-to-excludes5340755editdlrm
git-set-file-times39020755editdlrm
logfilter11000755editdlrm
lsh30980755editdlrm
mnt-excl18440755editdlrm
munge-symlinks26170755editdlrm
rsync-no-vanished5930755editdlrm
rsyncstats86870755editdlrm
Edit: /usr/share/rsync/scripts/files-to-excludes (534B)
#!/usr/bin/perl # This script takes an input of filenames and outputs a set of # include/exclude directives that can be used by rsync to copy # just the indicated files using an --exclude-from=FILE option. use strict; my %hash; while (<>) { chomp; s#^/+##; my $path = '/'; while (m#([^/]+/)/*#g) { $path .= $1; print "+ $path\n" unless $hash{$path}++; } if (m#([^/]+)$#) { print "+ $path$1\n"; } else { delete $hash{$path}; } } foreach (sort keys %hash) { print "- $_*\n"; } print "- /*\n";