Copying entire dir using SFTP

0

1

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?

Optimus Prime

Posted 2013-01-24T16:45:02.980

Reputation: 115

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 – 2017-09-09T21:39:14.120

Answers

2

Use -r switch

sftp> get -r folder/

Kride

Posted 2013-01-24T16:45:02.980

Reputation: 1 079

2this actually does copy hidden files! You should emphasize that the key to copying hidden files ist the slash "/" at the end! – Tobias Gassmann – 2017-09-09T21:47:20.643