rsync has a --exclude operand (which handles globs):
rsync -axAXv --delete -e "ssh -p 20026" --exclude 'tmp.session/*' --exclude 'documents/*'
/home/webmaster/public_html/server1.example.com/DocumentRoot/ rsync://server2.example.com/backup/
If you rsync'ing locally, you won't need the -e operand.
Bill
On 8/1/2019 5:13 PM, ToddAndMargo via users wrote:
Hi All,
Is there a way to do a "cp -r" and have it
exclude certain directories?
Many thanks,
-T
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org