It is inconceivable that this is proving to be so difficult but I'm trying to use rsync
to copy only files matching a specific pattern. Specifically, copy files in all subdirectories matching "*000.csv"
You would think that the following
rsync -avrP --include='*000.csv' host:'~/data/' .
would do the trick. Instead this targets all files in all subdirectories (?!). This blog suggests you can only "include" things that have been excluded first. Okay, so then why do these:
rsync -avrP --exclude='*' --include='*000.csv' host:'~/data/' .
rsync -avrP --filter='-! */' --include='*000.csv' host:'~/data/' .
both target no files at all. Please help. Thank you.
**/*000.csv
or**000.csv
.*
matches anything except slashes,**
matches anything including slashes. seeman rsync
and search for "PATTERN RULES". – cas Feb 03 '18 at 02:47