A simple thing really, I'm on ubuntu and tried different ways. ssh is not allowed on the machine, sftp only. Wget doesn't understand the ftp:// for some reason, so other SF posts I found didn't net any results.

so far lftp works with single files, but I can not get it to work with wildcards in a way, where every directory is downloaded recursively and not just the files thrown around in a single folder.

On this remote server in /files/ I have 3 directories with spaces, named "Foo Part 1", "Foo Part 2" and "Foo Part 3".

I need to find a single command a la "download me /files/Foo\ Part* from this sftp server to directory /bar/ recursively" in linux with the option to coninue partial downloads if possible.

I tried

mget -c -O /bar/ /files/Foo\ Part*

glob mget -c -O /bar/ /files/Foo\ Part*

which should work, but either no files are found or I get weird no permission errors, even tho I'm able to access those files and folders manually.

Anyone can give me a few directions what works in this time and age?

  • Have you tried quotes around the path in the command? – Tero Kilkanen Apr 6 '17 at 17:37
  • yes, that made lftp not find anything – radonthetyrant Apr 6 '17 at 17:37
  • so sftp, ftp or lftp? They are completely differnet protocols so make up you mind what you want. – Jakuje Apr 7 '17 at 6:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.