1#! /bin/sh 2 3# testing --exclude basics 4 5. ${tstdir-.}/lib.sh 6. ${tstdir-.}/conf.sh 7 8rm -rf dir1 dir2 dir3 9# make the copy-from-here tree 10mkdir dir1 11cd dir1 12generate_tree_1 13# make the tree we want to compare to 14mkdir ../dir2 15cd ../dir2 16generate_tree_1 17# manually delete the file that should be missing after rsync 18rm foo/bar/baz/*' ' 19 20cd .. 21$rsync --exclude '* ' -a dir1/ dir3 22compare_trees dir2 dir3 23