tldr/pages/common/wget.md

37 lines
1.0 KiB
Markdown
Raw Normal View History

2014-02-24 16:29:46 +00:00
# wget
> Download files from the Web.
> Supports HTTP, HTTPS, and FTP.
2014-02-24 16:29:46 +00:00
- Download the contents of an URL to a file (named "foo" in this case):
2014-02-24 16:29:46 +00:00
`wget {{https://example.com/foo}}`
2014-02-24 16:29:46 +00:00
2017-12-06 10:45:26 +00:00
- Download the contents of an URL to a file (named "bar" in this case):
`wget -O {{bar}} {{https://example.com/foo}}`
- Download a single web page and all its resources (scripts, stylesheets, images, etc.):
2014-02-24 16:29:46 +00:00
`wget --page-requisites --convert-links {{https://example.com/somepage.html}}`
2014-02-24 16:29:46 +00:00
- Download a full website, with 3-second intervals between requests:
`wget --mirror --page-requisites --convert-links --wait=3 {{https://example.com}}`
2014-02-24 16:29:46 +00:00
- Download the contents of an URL via authenticated FTP:
2014-02-24 16:29:46 +00:00
`wget --ftp-user={{username}} --ftp-password={{password}} {{ftp://example.com}}`
2014-02-24 16:29:46 +00:00
- Limit download speed to 200 kB/s:
2014-02-24 16:29:46 +00:00
`wget --limit-rate={{200k}} {{https://example.com}}`
- Continue an incomplete download:
2014-02-24 16:29:46 +00:00
`wget -c {{https://example.com}}`
2016-05-15 14:49:44 +01:00
2016-05-17 06:28:13 +01:00
- Retry a given number of times if the download doesn't succeed at first:
2016-05-15 14:49:44 +01:00
`wget -t {{number_of_retries}} {{https://example.com}}`