I'm just learning to use sftp, and I want to copy a directory from the remote computer to my local computer. If I try
it gives me this error:
Cannot download non-regular file: /home/mpirocch/Documents
get -R doesn't work, either.
Then use the
Or to upload just:
You have to
Don't use the sftp program directly if you can find something better. For Linux, many file managers (at least Nautilus and Dolphin, the GNOME and KDE ones) support sftp natively, and there's always sshfs. For windows, there's WinSCP, and probably others. The point of all of these is to let you access files over sftp as if they were on a regular filesytem, so you don't have to care that you're accessing them over sftp.
it will get all the files in that directory. However, it will not recursively get the contents of any subdirectories.
well this little guide should help, mirror a remote server to local folder with lftp
if you want to download files in parallel switch out
hope this helps anyone needing to mirror a remote folder to a local folder
The above will preserve times and modes of the original files and subdirectories. This is especially useful for the retrieval of backups.
I have Java dist folder in remote server, where i have following tree:
Goal is: I want to use SFTP? And put them in /tmp/<>
Step 1. sftp remoteuser@ip
Step 2. cd /var/tmp
Step 2. lmkdir /tmp/dist; lmkdir /tmp/dist/lib
Step 3. lcd /tmp/dist
Step 4. mget *
Step 5. lcd /tmp/dist/lib
Step 6. mget *
Step 7. finally i have my goal
FileZilla is the best client I have used, which of course can use SFTP underneath:
The GUI make is easy to copy over a whole directory.
Thank you for your interest in this question.
Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.
Would you like to answer one of these unanswered questions instead?