Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I am trying to sftp the directory structure ( Here the directory is having other directories recursively) I am not getting all the files.

Can you please suggest me the way to do this

Thanks shyam

share|improve this question

migrated from Sep 16 '11 at 10:20

This question came from our site for professional and enthusiast programmers.

Another way to do this ( and it skips over files that are already copied )

rsync -av your/local/dir/ user@remotehost:/your/remote/dir/
share|improve this answer
Thanks a lot!! After hours of trying stuff that didn't work, your method worked for me. phew!! thx! – Amatya Sep 18 '14 at 12:42

Use scp -r:

scp -r /your/local/dir user@remotehost:/your/remote/dir
share|improve this answer

Recent versions of OpenSSH sftp client also support recursive transfers:

sftp> get -r /remote/path /local/path

Though, my preferred almost-any-protocol command-line client is lftp!

share|improve this answer

Your Answer


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