1

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

8

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

Rsync uses secure copy.

4
  • 2
    Actually, it pipes over SSH. But the net result is the same. Dec 2 '10 at 16:43
  • How do you rsync to another server? Dec 2 '10 at 16:49
  • Specify the destination in the form host:dir, such as newserver:/destdir. 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
0

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?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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