Ubuntu – How to download a directory over FTP

downloadsftp

I want to download a directory over FTP. The directory is very large, and it would be useful if I can pause and resume the download as needed.

The target FTP directory is static. That is, it's contents won't change in time. And no authentication is needed.

What's the best tool to do this job?

Best Answer

wget should work:

wget -r -l 0 ftp://username:password@some.host/some_dir/*

wget is tool for downloading files.

  • -r means recursive.
  • -l 0 for infinite recursion, because -r by default have recursion depth of 5.
  • some_dir/ is relative to user home dir. If you want absolute path add one more / after host name.

Maybe you have to use --user and --password arguments to get it to work on Ubuntu.(according to https://stackoverflow.com/questions/113886/how-do-you-recursively-ftp-a-folder-in-linux)