0
In this brief guide, we will see three command-line tools to download files from the web under a Linux platform. If you have more tools, please mention them in the comment form below.

1. wget

Wget is a free utility used to download files from the Web. It supports HTTP , HTTPS , FTP protocols, and also through HTTP proxies. To use wget without adding arguments, you may write this:

wget  URL

Replace URL with any link of your choice. If you want to resume broken or failed download, you may add the "-c" argument as follows:

wget -c URL

Also to rename the file you are going to download, you may use the "-O" argument as follows:

wget -c URL -O filename

For more help and extra arguments for wget, run this command:

wget -h

2. curl

curl is another command line tool to download files via FTP or HTTP(s). You can use this tool only if wget is not installed in your system. To download a file using curl, you may write this:

 curl -O URL

or

 curl --remote-name URL

3. HTTPie

HTTPie is another command line HTTP client to dwnload files with. You can install it as follows:

- Debian

Install HTTPie on Debian 8 or older using these commands:

su -
apt-get install httpie

- CentOS 7

For CentOS 7, run these commands:

sudo yum install epel-release
sudo yum install httpie

- Arch Linux

To install HTTPie on Arch Linux, run these commands:

sudo pacman -S python-pip
sudo pip install --upgrade httpie
- Fedora

Run these commands:

sudo yum install python-pip 
sudo pip install --upgrade httpie


HTTPie Usage

To download a file with HTTPie, write this:

http --download URL

Example:

http --download https://github.com/twbs/bootstrap/archive/v3.3.4.zip

For more information about HTTPie, run this command:

 http -h

Post a Comment

 
Top