2024-10-07 10:19:31 +02:00
|
|
|
# wget2
|
|
|
|
|
|
|
|
> An improved version of `wget` for downloading files from the web.
|
|
|
|
> Supports HTTP, HTTPS, and HTTP/2 protocols with enhanced performance.
|
|
|
|
> By default, `wget2` uses multiple threads for faster downloads.
|
2025-03-26 02:30:50 +02:00
|
|
|
> More information: <https://manned.org/wget2>.
|
2024-10-07 10:19:31 +02:00
|
|
|
|
|
|
|
- Download the contents of a URL to a file using multiple threads (default behavior differs from `wget`):
|
|
|
|
|
|
|
|
`wget2 {{https://example.com/foo}}`
|
|
|
|
|
|
|
|
- Limit the number of threads used for downloading (default is 5 threads):
|
|
|
|
|
2025-03-26 02:30:50 +02:00
|
|
|
`wget2 --max-threads {{10}} {{https://example.com/foo}}`
|
2024-10-07 10:19:31 +02:00
|
|
|
|
|
|
|
- Download a single web page and all its resources (scripts, stylesheets, images, etc.):
|
|
|
|
|
2025-03-26 02:30:50 +02:00
|
|
|
`wget2 {{[-p|--page-requisites]}} {{[-k|--convert-links]}} {{https://example.com/somepage.html}}`
|
2024-10-07 10:19:31 +02:00
|
|
|
|
|
|
|
- Mirror a website, but do not ascend to the parent directory (does not download embedded page elements):
|
|
|
|
|
2025-03-26 02:30:50 +02:00
|
|
|
`wget2 {{[-m|--mirror]}} {{[-np|--no-parent]}} {{https://example.com/somepath/}}`
|
2024-10-07 10:19:31 +02:00
|
|
|
|
|
|
|
- Limit the download speed and the number of connection retries:
|
|
|
|
|
2025-03-26 02:30:50 +02:00
|
|
|
`wget2 --limit-rate {{300k}} {{[-t|--tries]}} {{100}} {{https://example.com/somepath/}}`
|
2024-10-07 10:19:31 +02:00
|
|
|
|
|
|
|
- Continue an incomplete download (behavior is consistent with `wget`):
|
|
|
|
|
2025-03-26 02:30:50 +02:00
|
|
|
`wget2 {{[-c|--continue]}} {{https://example.com}}`
|
2024-10-07 10:19:31 +02:00
|
|
|
|
|
|
|
- Download all URLs stored in a text file to a specific directory:
|
|
|
|
|
2025-03-26 02:30:50 +02:00
|
|
|
`wget2 {{[-P|--directory-prefix]}} {{path/to/directory}} {{[-i|--input-file]}} {{URLs.txt}}`
|
2024-10-07 10:19:31 +02:00
|
|
|
|
|
|
|
- Download a file from an HTTP server using Basic Auth (also works for HTTPS):
|
|
|
|
|
2025-03-26 02:30:50 +02:00
|
|
|
`wget2 --user {{username}} --password {{password}} {{https://example.com}}`
|