From 968aa0bff4d8ab71cdf6111b0298f240b6fa4675 Mon Sep 17 00:00:00 2001 From: Waldir Pimenta Date: Wed, 27 Sep 2017 15:27:59 +0100 Subject: [PATCH] wget: reorder examples and add additional details (#1501) --- pages/common/wget.md | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/pages/common/wget.md b/pages/common/wget.md index 2f020d9cac..dc2f6dbaa8 100644 --- a/pages/common/wget.md +++ b/pages/common/wget.md @@ -3,26 +3,30 @@ > Download files from the Web. > Supports HTTP, HTTPS, and FTP. -- Download the contents of an URL to a file: +- Download the contents of an URL to a file (named "foo" in this case): -`wget -O {{filename}} {{url}}` +`wget {{https://example.com/foo}}` -- Limit download speed: +- Download a single web page and all its resources (scripts, stylesheets, images, etc.): -`wget --limit-rate={{200k}} {{url}}` +`wget --page-requisites --convert-links {{https://example.com/somepage.html}}` + +- Download a full website, with 3-second intervals between requests: + +`wget --mirror --page-requisites --convert-links --wait=3 {{https://example.com}}` + +- Download the contents of an URL via authenticated FTP: + +`wget --ftp-user={{username}} --ftp-password={{password}} {{ftp://example.com}}` + +- Limit download speed to 200 kB/s: + +`wget --limit-rate={{200k}} {{https://example.com}}` - Continue an incomplete download: -`wget -c {{url}}` - -- Download a full website: - -`wget --mirror -p --convert-links -P {{target_folder}} {{url}}` - -- FTP download with username and password: - -`wget --ftp-user={{username}} --ftp-password={{password}} {{url}}` +`wget -c {{https://example.com}}` - Retry a given number of times if the download doesn't succeed at first: -`wget -t {{number_of_retries}} {{url}}` +`wget -t {{number_of_retries}} {{https://example.com}}`