mwget 多線程版本wget下載工具

linux運維在操做linux過程當中,用得最多的linux下載工具想必必定是wget,沒有看到哪一臺服務器沒裝過wget的,或許有人使用 ftp下載,也有人使用多線程的axel以及ProZilla,毫無疑問這兩個工具都很是的出色,可是對於習慣使用wget的人來講顯得不適應,因而老外 便開發了多線程版本的wget工具mwget,m表示multi多線程的意思.
php

1. 安裝mwget

官方地址:http://sourceforge.net/projects/kmphpfm/?source=dlp html

# cd /usr/local/src/
# 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

configure過程當中若是出現以下錯誤,請安裝大於等於0.35版本的intltool linux

checking for intltool >= 0.35.0... ./configure: line 6824: intltool-update: command not found
 found
configure: error: Your intltool is too old.  You need intltool 0.35.0 or later.
# yum install intltool

2. wget vs mwget速度測試

如下使用下載2.4.5版本的mongodb來取樣. web

2.1 mwget速度測試 mongodb

# mwget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.4.5.tgz
Begin to download: mongodb-linux-x86_64-2.4.5.tgz
FileSize:  90M
 36% [====>         =====>        ===>          ====>          ] [ 33M] [2.0M/s] [ETA:00:28]

mwget速度截圖以下: bash

mwget多線程下載速度mwget多線程下載速度

2.2 wget速度測試 服務器

# wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.4.5.tgz
--2013-08-16 10:55:23--  http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.4.5.tgz
Resolving fastdl.mongodb.org... 54.230.114.206, 54.230.113.36, 54.230.114.144, ...
Connecting to fastdl.mongodb.org|54.230.114.206|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 94827295 (90M) [application/x-tar]
Saving to: 「mongodb-linux-x86_64-2.4.5.tgz.1」

 6% [==>                                                ] 6,470,547    210K/s  eta 6m 26s

wget速度截圖以下 多線程

wget單線程下載速度截圖

wget單線程下載速度截圖 app

3. mwget用法:

# mwget -h
GNU MWget 0.1.0 ,a non-interactive and multiline network retriever of all POSTIX Systems.
Usage:  mwget  [Options]... [URL]...
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]

Mail bug reports and suggestions to <sa@kmlinux.tk><xiao_suo@hotmail.com>
On website bug reports and suggestions to <http://mwget.sourceforge.net/> <http://www.kmlinux.tk/>
We Welcome your BUG REPORT!

4. 總結

mwget雖然功能偏少,而且沒法徹底替代單線程版本的wget,可是對於咱們基本只是用wget簡單下載運維人員來講,mwget絕對是個無缺的選擇. 運維

分享來源:mwget 多線程版本wget下載工具

分享地址:http://www.ttlsa.com/html/2371.html

相關文章
相關標籤/搜索