I want to copy all image type files from a few directories to /images.I want to copy all video type files from the same directories to /videos.I want to exclude all dot directories and dot files (hidden files and directories).Directory structure:DCIM (GOOD)DCIM/.thumbnails (BAD)DCIM/AccessoryCamera (GOOD).cloudagent (BAD)Pictures (GOOD)Downloads (GOOD)I am trying:rsync -ravtz --progress --prune-empty-dirs --include DCIM/ --include Download/* --include Picture/ --include *.jpg --include *.png --include *.gif --include *.nef --exclude '*' --exclude '.*' --exclude '*/' --exclude '.*/' --exclude 'DCIM/.thumbnails/*' --log-file=/mm/rsync.log /mnt/S8/sdcard/ '/mm/images'rsync -ravtz --progress --prune-empty-dirs --include DCIM/ --include Download/* --include Picture/ --include *.mov --include *.mpeg --include *.mpg --include *.mp4 --exclude '*' --exclude '.*' --exclude '*/' --exclude '.*/' --exclude 'DCIM/.thumbnails/*' --log-file=/mm/rsync.log /mnt/S8/sdcard/ '/mm/videos'
Rsync: How do I sync only certain filetypes from certain directories?
rsync