The cart is empty

Wget is a simple yet powerful tool for downloading files from the internet, available on many operating systems including Linux, macOS, and Windows. Originally created in 1996, Wget supports HTTP, HTTPS, and FTP protocols and is highly valued for its ability to work in a command-line interface. This allows for automation of download processes through scripts and task schedulers.

Basic Usage

The basic syntax of the Wget command is as follows:

wget [options] [URL]

This command will download the file or page referenced by the URL into the current directory. Wget automatically names the downloaded file the same as the last part of the specified URL.

Advanced Features

Wget offers a range of advanced features that extend its basic usability:

  • Recursive downloading: Using the -r or --recursive option, entire websites including all sub-pages and linked files can be downloaded.

  • Limiting download speed: The --limit-rate option allows users to limit the download speed to prevent network infrastructure overload.

  • Resuming interrupted downloads: With the -c or --continue option, Wget can resume interrupted file downloads from where they left off.

  • Customizing HTTP headers: Through --header, users can add or modify HTTP request headers for advanced web manipulation.

Practical Examples

  1. Downloading a single file:

    wget https://example.com/file.zip
    
  2. Recursive downloading of an entire website:

    wget -r -np -k https://example.com
    

    -np (or --no-parent) prevents downloading of parent directories. -k (or --convert-links) modifies links on downloaded pages to function locally.

  3. Limiting download speed:

    This limits the download speed to 100 kB/s.

    This limits the download speed to 100 kB/s.

 

Wget is an invaluable tool for users and developers who need an efficient way to download files or entire web pages from the command line. Its flexibility and wide range of options make it an indispensable tool for automating downloads and managing files across networks.