Linux wget command Help and Examples

Linux utility wget is a free tool that is use to retrieving files using HTTP, HTTPS, and FTP protocols.

Wget has lots of features and capabilities to make it easy to retrieve large files from the internet, recursive downloads, or mirroring entire website or FTP sites.

The wget tool has the functionalities to run into the background without logged in to the system and can be called from cronjob scheduler, terminal, or bash scripts also.

There are multiple uses of wget utilities; some of the examples are below:

Example 1 –  Download a Single file

$  wget https://wordpress.org/latest.zip
2017-10-14 03:46:06– https://wordpress.org/latest.zip
Resolving wordpress.org (wordpress.org)… 66.155.40.250, 66.155.40.249
Connecting to wordpress.org (wordpress.org)|66.155.40.250|:443connected.
HTTP request sent, awaiting response200 OK
Length: 8912693 (8.5M) [application/zip]
Saving to:latest.zip
latest.zip 100%[===================================>] 8.50M 5.03MB/s in 1.7s
2017-10-14 03:46:07 (5.03 MB/s) – ‘latest.zipsaved [8912693/8912693]

Example 2 –  Download a file and save with different name

$  wget -O wordpress.zip    https://wordpress.org/latest.zip

Example 3 –  Download a file and save it in to specific location

$  wget -P  /opt/wordpress   https://wordpress.org/latest.zip

Example 4  –  Download file in background

$   wget -b https://wordpress.org/latest.zip

Example 5 –  Download a file and set download speed

$  wgetlimit-rate=300k https://wordpress.org/latest.zip

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Related Articles