0

In sftp, put * or get * do not get the hidden files or directories inside a dir.

What to do if I want to use sftp to copy entire dir, along with the subdirs that are hidden?

For example, a .git directory inside the directory. I do not require the scp commands. How to do that in a sftp shell?

  • this is not a duplicate. This question is concerned with hidden files. The linked question does not say anything about hidden files. Additionally this is the number one google-hit for "sftp hidden files" – Tobias Gassmann Sep 9 '17 at 21:39
2

Use -r switch

sftp> get -r folder/
  • 2
    this actually does copy hidden files! You should emphasize that the key to copying hidden files ist the slash "/" at the end! – Tobias Gassmann Sep 9 '17 at 21:47

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.