使用wget下載文件時十分緩慢 可使用mwget進行加速 其中m代表多線程的意思
1.安裝mwget
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
./configure
如果出現 error: C++ compiler cannot create executables 說明沒有安裝c++編譯器 安裝一個c++編譯器就可以了
yum install gcc-c++
如果執行./configure 出現 configure: error: Your intltool is too old. You need intltool 0.35.0 or later.
需要安裝0.35.0以上的版本
yum install intltool
如果提示:No usable OpenSSL found錯誤
yum install openssl openssl-devel
然後做最後的安裝
make
make install
安裝完畢後 可以使用mwget下載
mwget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz
mwget功能選項
mwget --help
#執行後可以直接看到幫助說明
-b, –debug
#調試模式,顯示調試信息
-c, –count=num
#設置重試次數爲[num],不限制次數設置爲“0“,默認設置爲“99”。
-d, –directory=dir
#設置本地目錄爲[dir],默認值爲當前目錄。
-f, –file=file
#重命名下載後文件爲[file]
-i, –interval=num
#設置FTP重試期限爲[num]秒,默認爲“5“。
-n, –number=num
#設置下載的線程數,默認開4個線程。
-r, –referer=URL
#使用“Referer: [URL]”在HTTP頭中僞造請求欺騙服務器。
-t, –timeout=num
#設置超時時間爲[num]秒,默認設置是“30”。
-v, –version
#顯示mwget的版本,然後退出。
-x, –proxy=URL
#設置代理 [URL]
功能使用詳解
mwget -n 10 https://jpg.ink/images/2019/beautiful-girl.tif
#n指的是多線程項,10指的是線程數。別的選項默認就行,不痛不癢也都ok