Downloading from a web page
Downloading a file or a web page is simple. A few command-line download utilities are available to perform this task.
Getting ready
wget
is a flexible file download command-line utility that can be configured with many options.
How to do it...
A web page or a remote file can be downloaded using wget
:
$ wget URL
For example:
$ wget knopper.net --2016-11-02 21:41:23-- http://knopper.net/ Resolving knopper.net... 85.214.68.145 Connecting to knopper.net|85.214.68.145|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 6899 (6.7K) [text/html] Saving to: "index.html.1" 100% [=============================]45.5K=0.1s 2016-11-02 21:41:23 (45.5 KB/s) - "index.html.1" saved [6899/6899]
It is also possible to specify multiple download URLs:
$ wget URL1 URL2 URL3 ..
How it works...
By default, the downloaded files are named the same as the URL, and the download information and progress is written to stdout
.
The -O
option specifies the output filename. If a file...