Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

share|improve this question

2 Answers 2

up vote 8 down vote accepted

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

Rsync uses secure copy.

share|improve this answer
2  
Actually, it pipes over SSH. But the net result is the same. –  Ignacio Vazquez-Abrams Dec 2 '10 at 16:43
    
How do you rsync to another server? –  Andrew Fashion Dec 2 '10 at 16:49
    
Specify the destination in the form host:dir, such as newserver:/destdir. –  James Sneeringer Dec 2 '10 at 17:44
    
+1: I was about to ask how to do scp recursively. I forgot about rsync. –  David W. May 1 '12 at 17:31

Happy to be proven wrong but there's nothing I can see in the man page to suggest you can, presumably you're using '-r' right?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.