Downloading from a web page
Downloading a file or a web page from a given URL is simple. A few command-line download utilities are available to perform this task.
Getting ready
wget
is a file download command-line utility. It is very flexible and can be configured with many options.
How to do it...
A web page or a remote file can be downloaded by using wget
, as follows:
$ wget URL
For example:
$ wget http://slynux.org --2010-08-01 07:51:20-- http://slynux.org/ Resolving slynux.org... 174.37.207.60 Connecting to slynux.org|174.37.207.60|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 15280 (15K) [text/html] Saving to: "index.html" 100%[======================================>] 15,280 75.3K/s in 0.2s 2010-08-01 07:51:21 (75.3 KB/s) - "index.html" saved [15280/15280]
It is also possible to specify multiple download URLs, as follows:
$ wget URL1 URL2 URL3 ..
How it works...
Usually, files are downloaded with the same filename as in the URL, and the...