Ftp – Get all files using FTP via Unix Terminal

ftpmgetterminalunix

Using the FTP command in the Unix terminal I want to download all files / folders from my FTP server.

When I use this command:

ftp> mget *

I get lots of these errors:

ftp: Unable to determine real path of `subdomains': No such file or directory
Skipping non-relative filename `subdomains/dev'

Does anyone know how I can get all files and maintain the directory structure without getting the errors?

Thanks

Best Answer

wget can mirror ftp sites as well. Here is an example on how to mirror Project Gutenberg Europe.

wget --mirror --no-host-directories --passive-ftp --no-parent --cut-dirs=4 \
     --output-file=/tmp/wget-gutenberg.log ftp://ftp.ibiblio.org/pub/docs/books/gutenberg