Browse Source

wget: reorder examples and add additional details (#1501)

Waldir Pimenta 7 years ago
parent
commit
968aa0bff4
1 changed files with 15 additions and 11 deletions
  1. 15 11
      pages/common/wget.md

+ 15 - 11
pages/common/wget.md

@@ -3,26 +3,30 @@
 > Download files from the Web.
 > Download files from the Web.
 > Supports HTTP, HTTPS, and FTP.
 > 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}}`
 
 
-- Continue an incomplete download:
+- Download a full website, with 3-second intervals between requests:
+
+`wget --mirror --page-requisites --convert-links --wait=3 {{https://example.com}}`
 
 
-`wget -c {{url}}`
+- Download the contents of an URL via authenticated FTP:
 
 
-- Download a full website:
+`wget --ftp-user={{username}} --ftp-password={{password}} {{ftp://example.com}}`
 
 
-`wget --mirror -p --convert-links -P {{target_folder}} {{url}}`
+- Limit download speed to 200 kB/s:
 
 
-- FTP download with username and password:
+`wget --limit-rate={{200k}} {{https://example.com}}`
+
+- Continue an incomplete download:
 
 
-`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:
 - 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}}`