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?



From man aria2c

      Set FTP user. This affects all URIs.  Default: anonymous

      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
  • 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 :) – user2028856 Jan 30 '15 at 2:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.