Liesinger Horst
2006-Mar-15 08:37 UTC
does include not outomaticaly exclude not matching files ?
Hello, I was trying to syncronize two directories with --include="*800*" or "800*" or "/800*", but I always et the same file list. Does option --include not outomaticaly exclude not matching files ? /usr/local/bin/rsync -n --include="800*" --rsh=remsh --rsync-path=/usr/local/bin/rsync -rzpogctS --log-format=%f /data/DWG/N/5225 plot1:/data/DWG/N building file list ... done 5225/00/80024270N 5225/01/31001775N.a 5225/01/80020066N 5225/01/80023172N wrote 23771 bytes read 36 bytes 3174.27 bytes/sec total size is 64085705 speedup is 2691.88 I used rsync version 2.5.6 on HP-UX 10.20 Also I get alwazs the same output independent of my --log-format. Please help. Best regards Horst Liesinger CAD Coordination (IT) Mobil: +43 (0)664 / 3165367 Tel.: +43 (0)5574 / 604 - 284 Fax: +43 (0)5574 / 75590 Doppelmayr Seilbahnen GmbH Rickenbacherstrasse 8-10 Postfach 20 A-6961 Wolfurt Austria
Wayne Davison
2006-Mar-15 17:04 UTC
does include not outomaticaly exclude not matching files ?
On Wed, Mar 15, 2006 at 09:21:16AM +0100, Liesinger Horst wrote:> Does option --include not outomaticaly exclude not matching files ?No, it does not. All files are included by default, so if you don't exclude anything, no changes will be made to rsync's actions. Adding an --exclude='*' option to the end is common, but given that you're expecting subdirectories to be entered to get to the files, you'll also need to add --include='*/' before the exclude so that subdirectories are included too (see the man page for full details of why this is the case). See also the --prune-empty-dirs option in 2.6.7 if you end up with unwanted empty directories on the receiving side. ..wayne..