Quote:
Originally Posted by raghaven.kumar i would recommend scp cause its secure. |
For local copying, it doesn't matter. For remote copying you can tell rsync to use SSH with the -e flag, like this:
To answer the original question, you can do something like this:
Code:
rsync -av --include="*yes" --exclude="*" -n 1/ 2/
In my example, the directory 1 has files named a.yes, a.no, b.yes, b.no, etc. When the above command is run, only the *yes files get copied. Take note: rsync cares what comes first. If you put the exclude first, nothing gets copied.