GNU Wget command is used to download files from the web. Wget using the protocols HTTP, HTTPS and FTP for downloading. Wget command provides the following features to the users:
Multiple files downloading
Resume downloads
Bandwidth Limit setting
Periodic or Repeated downloads
Mirror Website
Background downloading and etc.,
Wget command helps the user for non-interactive downloads of files from the web which means that Wget download the files in the background without slow down or interrupt the current process. It progress the download (start and retrieval ) since the user is not logged on. Wget downloads the files without interruption in the slow and unstable network also.
Now we see about how to use the Wget command:
1. Installing Wget on Ubuntu and Debian:
$sudo apt install wget
Installing Wget on CentOS and Fedora:
$sudo yum install wget
2. Download a File with Wget Command:
Syntax:
$ wget [option] [url]
Example:
$ wget http://example.com/sample.php
During the download, wget shows the progress bar alongside the file name, file size, download speed, and the estimated time to complete the download. Once the download is complete, you can find the downloaded file in our current working directory.
Option | Uses |
-b | To Download the file in the background |
-o | To save the downloaded file in different name |
-p | Download the file to the specific directory |
--limit-rate | Limiting the Download speed. |
-c | To resume a /download |
-w | To specify the waiting seconds between the retrieval |
-r | Recursive retrieval of downloads in case of fatal error also. |
Comments (0)