How to keep directory structure with aria2?

后端 未结 1 1638
栀梦
栀梦 2021-02-10 15:39

I need to download files simultaneously- wget doesn\'t support that so I want to try aria2. But I don\'t see an option in aria2 to keep directory structure.

相关标签:
1条回答
  • 2021-02-10 16:30

    Determine the directory structure first, then build and use a download description file:

    aria2c -i uri.txt
    

    where uri.txt might contain

    http://serverA/file1.iso http://mirror-serverB/file1.iso
    # parameters must begin with a space, otherwise it's treatened as url!
     dir=/downloads/a
    # not mandatory
     out=file1.iso
    
    http://serverA/file2.iso http://mirror-serverB/file2.iso
     dir=/downloads/b
     out=file2.iso
    

    Keep in mind that aria2 is a download util - not an sync util, like rsync or lftp.

    Referencing an rsync answer: https://stackoverflow.com/a/4147263/1163786 and an lftp answer: https://superuser.com/a/305236.

    0 讨论(0)
提交回复
热议问题