Saturday, 19 July 2025

Five Powerful Uses of the wget Command

Unlock the full potential of your terminal with these practical wget examples.

1. Download a Single File

The most basic use of wget is downloading a file from a given URL:

wget https://example.com/file.zip

This saves the file in your current directory with its original name.

2. Download an Entire Website

You can mirror an entire website for offline viewing:

wget --mirror --convert-links --page-requisites --no-parent https://example.com

This command recursively downloads pages, images, stylesheets, and converts links for local browsing.

3. Resume Interrupted Downloads

If a download was interrupted, you can resume it using the -c flag:

wget -c https://example.com/largefile.iso

This is particularly helpful for large files or slow connections.

4. Download Files from a List

Put URLs in a text file and download them all at once:

wget -i urls.txt

Each line in urls.txt should be a complete URL. Great for batch downloading.

5. Set Download Speed Limits

To avoid hogging bandwidth, limit the download speed:

wget --limit-rate=200k https://example.com/bigfile.zip

This restricts the download speed to 200 KB/s.

No comments:

Post a Comment