下载工具aria2, axel 和 mwget
2018-11-20 12:49 tangxiaosheng 阅读(1932) 评论(0) 编辑 收藏 举报aria2, axel, yum安装或者apt-get安装
aira2
参考 Ubuntu/Debian系统安装配置aria2和WebUI,但webui配置没成功,我用的是chrome的aria2插件。
下载结束后得到通知,参考 aria2 使用指南,里面介绍的是Windows下的情况。我实际是:
apt -y install ruby-notify
download-complete-hook.sh内容是:
#!/bin/bash fname=`basename $3` notify-send "$fname 已经下载完成!"
/etc/aria2/aria2.conf末尾增加:
on-download-complete=/etc/aria2/download-complete-hook.sh on-bt-download-complete=/etc/aria2/download-complete-hook.sh
当然需要 chmod a+x /etc/aria2/download-complete-hook.sh
mwget
但有时axel不行,需要上wget,但单线程的太慢,需要安装mwget。
apt-get -y install intltool
wget http://jaist.dl.sourceforge.net/project/kmphpfm/mwget/0.1/mwget_0.1.0.orig.tar.bz2
tar -xjvf mwget_0.1.0.orig.tar.bz2
cd mwget_0.1.0.orig
./configure
make
make install
mwget比wget速度,实测提升了至少4倍。因为缺省是4个线程,所以快了4倍。
选项是:
Options:
-b, --debug Show the debug message
-c, --count=num Set the retry count to [num], no limit when "0", the default is "99"
-d, --directory=dir Set the local direcotry to [dir], the default is "."
-f, --file=file Rename the file to [file]
-h, --help A brief summary of all the options
-i, --interval=num Set the ftp retry interval to [num] seconds, the default is "5"
-n, --number=num Use [num] connections instead of the default (4)
-r, --referer=URL Include `Referer: [URL]' header in HTTP request.
-t, --timeout=num Set the connection timeout to [num] seconds, the default is "30"
-v, --version Show the version of the mwget and exit
-x, --proxy=URL Set the proxy [URL]
写了个wget.sh,内容如下:
#!/bin/bash
if ! axel $*;then
mwget -n 8 $*
fi
用axel下载东西时,容易出现 Too many redirects. 的错误,这时候可以改用wget或者mwget。mwget没有下载完,退出,重新执行一次,就能断点续传了。