Linux Wget Command Guide
Introduction
Wget is a free utility for non-interactive download of files from the web. It supports HTTP, HTTPS, and FTP protocols, as well as retrieval through HTTP proxies.
Usage
To download a file, use the following command:
wget [options] [URL]
Common Options
-O <file>
: Save the downloaded file with a specific name.-r
: Download files recursively.-p
: Download all necessary files for displaying a webpage.-N
: Only download files that are newer than the local copies.
Examples
-
Download a single file:
wget https://example.com/file.zip
-
Download a file and save it with a different name:
wget -O newfile.zip https://example.com/file.zip
-
Download a webpage and all its resources:
wget -p https://example.com
-
Recursively download a website:
wget -r https://example.com