Skip to content

Latest commit

 

History

History
86 lines (52 loc) · 1.34 KB

File metadata and controls

86 lines (52 loc) · 1.34 KB

1. Basic Download

Download a single file:

wget http://example.com/file.zip
  • This saves file.zip in your current directory.

2. Download with a Different Filename

wget -O myfile.zip http://example.com/file.zip
  • -O lets you rename the file while downloading.

3. Download in Background

wget -b http://example.com/file.zip
  • -b downloads in the background.
  • Logs are saved to wget-log.

4. Resume an Interrupted Download

wget -c http://example.com/file.zip
  • -c continues where it left off if the download was interrupted.

5. Download an Entire Website

wget -r -np -k http://example.com
  • -r: recursive (download linked pages)
  • -np: no parent (don’t go to upper directories)
  • -k: convert links for offline viewing

6. Limit Download Speed

wget --limit-rate=100k http://example.com/file.zip
  • Limits download speed to 100 KB/s.

7. Download with Username and Password

wget --user=username --password=password http://example.com/securefile.zip

8. Download Multiple Files

Create a file urls.txt with one URL per line, then:

wget -i urls.txt

Documentation: GNU Wget Manual