Rsync filter and ignore some directories [closed]
Solution 1:
rsync -a --exclude "__pycache__/" source/ destination/
You may also want to pass --delete-excluded
to remove __pycache__
files that have been copied (of course it removes all other excluded files from the destination too too).