The following pattern copies the .pdf files from source to destination, working fine.
rsync -rv --include="*.pdf" --include="*/" --exclude="*" --prune-empty-dirs /source/ ~/destination/
but I want to exclude the files which contains web in file name is not working it is even copying the file web_profile.pdf file to the destination, why it is so.
rsync -rv --include="*.pdf" --include="*/" --exclude="*web*.pdf" --exclude="*" --prune-empty-dirs /source/ ~/destination/
Also I'm not clear about the excluding particular directory like **/
(mean 2 stars and single star).
Can someone please clear my doubts regarding pattern matching in rsync.
--include="*.pdf"
matches *pdf
, if I want to exclude some directory like ../web-info/..pdf
, how do I do it?