linux aria2下載磁力鏈接

安裝過程略。

查看是否安裝

# 查看是否安裝
aria2c 或  aria2c -v;
# 查看手冊
man aria2c;  

查看並下載

# 查看torrent文件內容  -S 是show-files,表示查看文件
aria2c -S xxx.torrent ;

# 下載選中文件,多文件用逗號分隔,支持 m-n的片段選法
aria2c --select-file=2,3,4-7 xxx.torrent

# 設置bt端口
aria2c --listen-port=3653 xxx.torrent

報錯 [ERROR] IPv6 BitTorrent: failed to bind TCP port 6923

這是因爲ipv6沒有開啓。vim /etc/sysctl.conf; 替換ipv6的設置如下:

#net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.all.disable_ipv6 = 0
net.ipv6.conf.default.disable_ipv6 = 0
net.ipv6.conf.lo.disable_ipv6 = 0

sysctl -p 重新加載配置。然後再試下發現不報錯了。

查看log日誌

# -l 指定日誌文件
aria2c -l log.txt xxx.torrent

報錯:Exception: [SocketCore.cc:312] errorCode=1 Failed to bind a socket, cause: Name or service not known

其他

限速設置

# 單個文件最大下載速度:
aria2c --max-download-limit=300K -s10 -x10 'http://xx.com/xx'
# 整體下載最大速度:
aria2c --max-overall-download-limit=300k -s10 -x10 'http://xx.com/xx'
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章