Aria2c 是一个命令行工具,用于进行文件的并行下载。它支持同时下载多个文件,并可以根据需求进行配置和自定义。
以下是一些常用的 Aria2c 并行下载参数及其代码示例:
-s
或 --split
参数:指定同时下载的分段数目。
示例:aria2c -s 5 http://example.com/file.txt
-x
或 --max-concurrent-downloads
参数:指定同时下载的最大任务数。
示例:aria2c -x 3 http://example.com/file1.txt http://example.com/file2.txt
-j
或 --max-connection-per-server
参数:指定与每个服务器的最大连接数。
示例:aria2c -j 8 http://example.com/file.txt
-k
或 --min-split-size
参数:指定分段下载的最小文件大小。
示例:aria2c -k 1M http://example.com/file.txt
--split-file
参数:将下载的文件分为多个部分。
示例:aria2c --split-file=true http://example.com/file.txt
--continue
参数:断点续传,继续下载上次未完成的任务。
示例:aria2c --continue http://example.com/file.txt
--max-download-limit
参数:限制下载速度的最大值。
示例:aria2c --max-download-limit=1M http://example.com/file.txt
--max-upload-limit
参数:限制上传速度的最大值。
示例:aria2c --max-upload-limit=512K http://example.com/file.txt
--file-allocation
参数:指定文件分配的方式,如 none
、prealloc
、falloc
。
示例:aria2c --file-allocation=prealloc http://example.com/file.txt
以上是一些常用的 Aria2c 并行下载参数及其代码示例。根据你的具体需求,可以选择适当的参数进行配置,以实现并行下载功能。
上一篇:aria2编译安装centos
下一篇:aria2c 不要输出结果表。