Is it possible to get all files in a directory using curl? Here's my string so far:
curl --ftp-ssl -k ftp://user:pass@IP
This will LIST the files in the user FTP directory, how do I adjust this string to get (RETR) all files in the remote directory?
AFAIK, there is no such option to download a directory with
curl
, so you must get the listing first and pipe it tocurl
to download file by file, something like this:You can also parallelise the process via
xargs
:Here's more reusable script that accomplishes quanta's curl|pipe|while solution: