linux 下载工具

本文介绍了十款高效的Linux命令行下载工具,包括Wget、Curl、Axel等,这些工具不仅支持普通文件下载,还能处理FTP资源、YouTube视频甚至BT种子。文章详细讲解了每个工具的特点及使用方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

http://www.unixmen.com/top-10-command-line-tools-downloading-linux/


http://os.51cto.com/art/201605/511423.htm

Top 10 command line tools for downloading in Linux

Introduction to Linux command line downloading tools

When we think about Linux, definitely a back and white terminal will come in the mind, a true Linux user always prefer to work from terminal even for downloading, a command line downloading tool can help user to download anything from internet more quickly, in comparison to some GUI tool. There are lots of downloading tools for general purpose and even for torrents also but only few tools like curl or wget  are more popular in comparison to other tools. In this tutorial we will discuss top 10 command line tools  for downloading in Linux. Let us discuss these cli tools one by one.

  1. Wget

This is the most famous tool which is used for downloading via cli. It is very rich tool which can acts like some full fledged GUI download manager, it has all of the features required for some ideal download manager like it can resume download, it can download multiple files, it can retry downloading if some connectivity problem is there, you can even manage maximum download bandwidth.

Example

Download some sample file form internet

# wget http://www.sample-videos.com/video/mp4/720/big_buck_bunny_720p_1mb.mp4

Sample output

--2016-05-11 16:56:23-- http://www.sample-videos.com/video/mp4/720/big_buck_bunny_720p_1mb.mp4
Resolving www.sample-videos.com (www.sample-videos.com)... 166.62.28.98
Connecting to www.sample-videos.com (www.sample-videos.com)|166.62.28.98|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1055736 (1.0M)

Saving to: ‘big_buck_bunny_720p_1mb.mp4’

100%[============================================================================================================>] 10,55,736 52.1KB/s in 24s

2016-05-11 16:56:47 (43.4 KB/s) - ‘big_buck_bunny_720p_1mb.mp4’ saved [1055736/1055736]

Download file in background

# wget  -b http://www.sample-videos.com/video/mp4/720/big_buck_bunny_720p_1mb.mp4

Resume download if internet connection got interrupted

# wget  -c http://www.sample-videos.com/video/mp4/720/big_buck_bunny_720p_1mb.mp4

Download file from some  password protected ftp repo

# wget --ftp-user=<user_name> --ftp-password=<Give_password> Download-url-address
2. Curl

Curl is another effective download tool, it can be use to upload or download file with giving a simple command, it supports  pause or resume of downloaded package and supports maximum of web protocols, it can predict time left in download to be complete, progress is visible via progress bar. It comes as built in tools for all of the Linux distributions. A quick and effective tool, let us have a look

Example
# curl -o um.mp4 http://www.sample-videos.com/video/mp4/720/big_buck_bunny_720p_1mb.mp4
Sample
% Total % Received % Xferd Average Speed Time Time Time Current
 Dload Upload Total Spent Left Speed
100 1030k 100 1030k 0 0 105k 0 0:00:09 0:00:09 --:--:-- 111k

with -o option provide a name, download file will be saved with that name, with -O (capital O) option, file will be saved by its original name.

# curl -O http://www.sample-videos.com/video/mp4/720/big_buck_bunny_720p_1mb.mp4

Download multiple files with single curl command

# curl -O http://www.sample-videos.com/video/mp4/720/big_buck_bunny_720p_2mb.mp4 -O http://www.sample-videos.com/video/mp4/720/big_buck_bunny_720p_1mb.mp4

3. Axal

A good alternative to wget, it is a lightweight download utility, it is actually a accelerator as it open multiple http connections which download separate file fragment and as a result the file get downloaded more quickly.

Installation
# apt-get install axal
Example
# axel http://www.sample-videos.com/video/mp4/720/big_buck_bunny_720p_1mb.mp4
Initializing download: http://www.sample-videos.com/video/mp4/720/big_buck_bunny_720p_1mb.mp4
Sample
File size: 1055736 bytes
Opening output file big_buck_bunny_720p_1mb.mp4.0
Starting download

[ 0%] .......... .......... .......... .......... .......... [ 64.9KB/s]
[ 4%] .......... .......... .......... .......... .......... [ 83.0KB/s]
[ 9%] .......... .......... .......... .......... .......... [ 91.5KB/s]
[ 14%] .......... .......... .......... .......... .......... [ 96.8KB/s]
[ 19%] .......... .......... .......... .......... .......... [ 100.2KB/s]
[ 24%] .......... .......... .......... .......... .......... [ 102.7KB/s]
[ 29%] .......... .......... .......... .......... .......... [ 104.6KB/s]
[ 33%] .......... .......... .......... .......... .......... [ 86.9KB/s]
[ 38%] .......... .......... .......... .......... .......... [ 77.1KB/s]
[ 43%] .......... .......... .......... .......... .......... [ 64.8KB/s]
[ 48%] .......... .......... .......... .......... .......... [ 66.8KB/s]
[ 53%] .......... .......... .......... .......... .......... [ 72.8KB/s]
[ 58%] .......... .......... .......... .....
Connection 1 finished
 ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,,,..... .......... [ 74.1KB/s]
[ 63%] .......... .......... .......... .......... .......... [ 79.8KB/s]
[ 67%] .......... .......... .......... .......... .......... [ 84.5KB/s]
[ 72%] .......... .......... .....
Connection 2 finished
 ,,,,,,,,,, ,,,,,,,,,, ,,,,,..... .......... .......... [ 86.3KB/s]
[ 77%] .......... .......... .......... .......... .......... [ 91.6KB/s]
[ 82%] .......... .......... .......... .......... .......... [ 96.7KB/s]
[ 87%] .......... .......... .......... .......... .......... [ 101.6KB/s]
[ 92%] .......... .......... .......... ...
Connection 0 finished
 ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,....... .......... [ 105.9KB/s]
[ 96%] .......... .......... ..........

Downloaded 1031.0 kilobytes in 9 seconds. (108.66 KB/s)

4. Youtube-dl

A dedicated tool to download videos from YouTube via command line, a quick to install package, which can be used to download even a bulk list of files.

Installation
# curl https://yt-dl.org/latest/youtube-dl -o /usr/local/bin/youtube-dl

Change file permission

# sudo chmod a+rx /usr/local/bin/youtube-dl
Example

Download some video, by adding video url with the command.

# youtube-dl https://www.youtube.com/watch?v=UZW2hs-2OAI

To download a video list, copy all of the url in a text file and run following command

#  youtube-dl -a <name_of_your_text_file.txt>
Sample
virtual-System-Product-Name prozilla-2.0.4-master # youtube-dl -a url.txt 
[youtube] xEf8A7X53YE: Downloading webpage
[youtube] xEf8A7X53YE: Downloading video info webpage
[youtube] xEf8A7X53YE: Extracting video information
[youtube] xEf8A7X53YE: Downloading MPD manifest
[download] Destination: EIC Outrage - Salute to Indian Athletes!-xEf8A7X53YE.mp4
[download] 3.9% of 70.87MiB at 82.53KiB/s ETA 14:04

5. Aria2

An open source command line download accelerator, support multiple ports,  you can download files with maximum bandwidth, easy to install and easy to use tool.

Installation
# apt-get install aria2

For centOS

# yum install aria2
Example

# aria2c http://www.sample-videos.com/video/mp4/720/big_buck_bunny_720p_1mb.mp4

Sample
[#28c7dd 0.9MiB/1.0MiB(93%) CN:1 DL:70KiB ETA:1s] 
05/11 23:06:47 [NOTICE] Download complete: /home/virtual/Desktop/prozilla-2.0.4-master/big_buck_bunny_720p_1mb.mp4

Download Results:
gid |stat|avg speed |path/URI
======+====+===========+=======================================================
28c7dd|OK | 72KiB/s|/home/virtual/Desktop/prozilla-2.0.4-master/big_buck_bunny_720p_1mb.mp4

Status Legend:
(OK):download completed.

6. Movgrab

The another effective tool for video downloading, advantage of using movgrab it that it can download videos not only from YouTube but also from almost all  of the famous websites like metacafe, dailiymotion, ehow, vobx etc. Very quick tool, movie format can be defined, you can resume download.

Installation

Download package  from this link

Extract package

# tar -xvf movgrab-1.2.1.tar.gz
# cd movgrab-1.2.1
# ./configure
# make
# make install

Use command to download package

Download a file with specific name

# movgrab Youtube_url

Define file format

# movgrab -o example.mp4 video_url

Use maovgrab -h for more details

7. rtorrent

The famous command line torrent client,  it comes with all Linux distributions, it require screen utility to work.

Instillation

Install screen

# apt-get install screen

Install rtorrent

# apt-get install rtorrent

Example

# rtorrent  example.torrent

 

dns(132)

8. ctorrent

C-torrent is a simplest commnd line torrent downloading tool,  can be installed quickly, it is a good alternative of micro-torrent or utorrent.

Installation
# apt-get install ctorrent
Example

Let us download a copy of latest Ubuntu server 16.04

# ctorrent ubuntu-16.04-server-amd64.iso.torrent

dns(133)Userctorrent -h for more options.

9. Transmission-cli

The command line version of version of transmission, a very strong tool for torrenting. Easy to install, it require ‘screen’ as dependency.

Installation
# apt-get install transmission-cli transmission-daemon transmission-common

Install screen

# apt-get install screen
Example
# screen -a /usr/bin/transmission-cli -p 25000 ubuntu-16.04-server-amd64.iso.torrent

dns(134)

10. vuze

A complete torrenting solution with minimum footprint, it is one of the most powerful torrent application, it require java to run on console, so make sure you have installed jre of open jdk on your system, it will also require ‘screen’  package.

Installation

It can be downloaded directly from this link , download and extract package

# tar -xvf VuzeInstaller.tar.bz2
# cd vuze

There are some dependencies which must be downloaded, grab required plugins from this link

Copy these .jar plugins to vuze directory

# cp *.jar vuze

Run following command

# java -cp "Azureus2.jar:commons-cli.jar:log4j.jar" org.gudy.azureus2.ui.common.Main --ui=console

After the above command is successful, run below command to launch

# screen java -jar Azureus2.jar --ui=console

dns(135)

Use help command, add use add command along with path of .torrent file to start download.

dns(136)

Conclusion

Command line tools are more effective and fast in comparison of GUI based torrent or download managers, these tools can play a important role in head less servers and can control bandwidth consumption in slow internet connections. Have fun!!


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值