Centos – How to SCP entire directory but exclude a directory

centosscp

I want to SCP an entire directory over to my new server, but exclude the thumbs/ directory inside /storage.

i want to scp over (and everything inside it, and all directories):
/storage

but exclude:
/storage/thumbs

thank you

Best Answer

Use rsync: rsync -av --exclude thumbs /storage dest

Rsync uses secure copy.