Howto: Use wget Recursively Download All FTP Directories

ww‮‬w.lautturi.com
Howto: Use wget Recursively Download All FTP Directories

The wget command is a command-line utility for downloading files from the web. It can be used to download files from FTP servers, as well as HTTP and HTTPS servers.

To use wget to download all directories from an FTP server recursively, you can use the -r option, like this:

wget -r ftp://ftp.example.com/path/to/directory

This will download the directory directory and all of its subdirectories from the FTP server ftp.example.com recursively. wget will follow all subdirectories and download all files within them.

By default, wget will download files in the current directory. To specify a different download directory, you can use the -P option, like this:

wget -r -P /path/to/download/directory ftp://ftp.example.com/path/to/directory

This will download the directory directory and all of its subdirectories to the specified download directory.

You can also use the --user and --password options to specify a username and password for the FTP server, if required. For example:

wget -r --user=username --password=password ftp://ftp.example.com/path/to/directory

This will download the directory directory and all of its subdirectories from the FTP server ftp.example.com using the specified username and password.

You can find more information about using wget to download directories from FTP servers and other options in the wget man page by running man wget in a terminal.

Created Time:2017-10-29 22:08:48  Author:lautturi