6

I'm currently using the following wget command to download from an FTP server from a list of URL's in a file:

wget --user=mylogin --password='mypassword' -P /home/ftp/ -i /var/www/file/url.txt -N

But now I need a way to simultaneously download multiple files at the same time. I'm trying to use aria2 for this and I tried the following command:

aria2c -x 5 -i /var/www/file/url.txt

But I can't seem to find a way to get aria2 to login first to the FTP.

So my question is, is there a command for aria2 to login first to the FTP server and then download from the list of URL's?

Alternatively is there a better tool better suited to my task?

Thanks

1 Answer 1

10

From man aria2c

--ftp-user=<USER>
      Set FTP user. This affects all URIs.  Default: anonymous

--ftp-passwd=<PASSWD>
      Set FTP password. This affects all URIs.  If user name is embedded  but  pass‐
      word is missing in URI, aria2 tries to resolve password using .netrc. If pass‐
      word is found in .netrc, then use it as password. If  not,  use  the  password
      specified in this option.  Default: ARIA2USER@

So you can use something like this

aria2c -j5 --ftp-user=yourname --ftp-passwd=password --input-file=list.txt 

Another way may be gnu parallel(check man parallel for more details):

cat list.txt | parallel -j5 wget --user=mylogin --password=mypassword -P /home/ftp
2
  • 1
    Thanks a lot for the parallel answer, I didn't even know about that and it works a lot better than aria2 for my case :) Jan 30, 2015 at 2:33
  • Also this settings works for Uget as aria2c GUI front end.
    – EsmaeelE
    Mar 12 at 9:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .