安装
yum install aria2
BT下载使用
aria2c -S 009.torrent 列出种子内容
⚡ root@ninesun /home/vagrant aria2c -S CentOS-7-x86_64-Everything-2009.torrent >>> Printing the contents of file 'CentOS-7-x86_64-Everything-2009.torrent'... *** BitTorrent File Information *** Comment: CentOS 7 x86_64 Everything ISO Creation Date: Fri, 06 Nov 2020 14:44:47 GMT Created By: mktorrent 1.0 Mode: multi Announce: http://torrent.centos.org:6969/announce http://ipv6.torrent.centos.org:6969/announce Info Hash: b3065849759c7a678f4967bffcae82ac2ed4552f Piece Length: 512KiB The Number of Pieces: 19457 Total Length: 9.5GiB (10,200,551,479) Name: CentOS-7-x86_64-Everything-2009 Magnet URI: magnet:?xt=urn:btih:B3065849759C7A678F4967BFFCAE82AC2ED4552F&dn=CentOS-7-x86_64-Everything-2009&tr=http%3A%2F%2Ftorrent.centos.org%3A6969%2Fannounce&tr=http%3A%2F%2Fipv6.torrent.centos.org%3A6969%2Fannounce Files: idx|path/length ===+=========================================================================== 1|./CentOS-7-x86_64-Everything-2009/0_README.txt |2.4KiB (2,495) ---+--------------------------------------------------------------------------- 2|./CentOS-7-x86_64-Everything-2009/CentOS-7-x86_64-Everything-2009.iso |9.5GiB (10,200,547,328) ---+--------------------------------------------------------------------------- 3|./CentOS-7-x86_64-Everything-2009/sha256sum.txt |398B (398) ---+--------------------------------------------------------------------------- 4|./CentOS-7-x86_64-Everything-2009/sha256sum.txt.asc |1.2KiB (1,258) ---+---------------------------------------------------------------------------
aria2c xxx.torrnet
限速下载
单个文件最大下载速度:
aria2c --max-download-limit=300K -s10 -x10 'http://xx.com/xx'
整体下载最大速度:
aria2c --max-overall-download-limit=300k -s10 -x10 'http://xx.com/xx'
多线程下载功能
使用aria2的分段和多线程下载功能可以加快文件的下载速度,对于下载大文件时特别有用。-x 分段下载,-s 多线程下载,如:
aria2c -s 2 -x 2 http://xx.com/xx
这将使用2个连接和2个线程来下载该文件。