rsync only *.php files How can I rsync mirror only *.php files? This gives me a bunch of empty dirs too and I don't want those. rsync -v -aze 'ssh ' \ --numeric-ids \ --delete \ --include '*/' \ --exclude '*' \ --include '*.php' \ user@site.com:/home/www/domain.com \ /Volumes/Servers/ Answer: The culprit here is the --include '*/' When including a wildcard followed by the trailing forward-slash you're telling rsync to transfer all files ending with a '/' (that is, all directories).Thus, rsync -v -aze