Copying entire dir using SFTP
9,488
Use -r switch
sftp> get -r folder/
Related videos on Youtube
Author by
Optimus Prime
Updated on September 18, 2022Comments
-
Optimus Prime over 1 year
In sftp,
put *
orget *
do not get the hidden files or directories inside adir
.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 thescp
commands. How to do that in asftp
shell?-
Tobias Gassmann over 6 yearsthis 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 over 6 yearsthis actually does copy hidden files! You should emphasize that the key to copying hidden files ist the slash "/" at the end!