axel で CLI 上から分割ダウンロードする
CLI からのダウンロードには wget や curl を使うことが多いと思います。より高速なダウンロードツールに axel があります。axel は同時接続数を増やすことでダウンロードを高速化しますが、その分、サーバ側には負担をかけてしまうので不必要な多用には注意する必要があります。
インストール
いずれの OS でも簡単にインストール出来ました。
macOS の場合
homebrew でインストール出来ました。
CentOS の場合
yum で標準リポジトリからインストール出来ます。
Ubuntu の場合
apt-get で標準リポジトリからインストール出来ます。
| sudo apt-get -y install axel
|
ヘルプ表示
ヘルプは以下のように表示されました。-n オプションで同時接続数を指定します。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 | $ axel --help
Usage: axel [options] url1 [url2] [url...]
--max-speed=x -s x Specify maximum speed (bytes per second)
--num-connections=x -n x Specify maximum number of connections
--output=f -o f Specify local output file
--search[=x] -S [x] Search for mirrors and download from x servers
--header=x -H x Add header string
--user-agent=x -U x Set user agent
--no-proxy -N Just don't use any proxy server
--quiet -q Leave stdout alone
--verbose -v More status information
--alternate -a Alternate progress indicator
--help -h This information
--version -V Version information
Visit https://github.com/eribertomota/axel/issues to report bugs
|
使用例
資料例は以下のようになります。