From 558edac53e36792c2146e9134ebd43673df3c762 Mon Sep 17 00:00:00 2001 From: saeed <39596095+smzm@users.noreply.github.com> Date: Wed, 27 Feb 2019 01:45:47 +0330 Subject: [PATCH] wget : add some options (#2798) --- pages/common/wget.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pages/common/wget.md b/pages/common/wget.md index a4dda8b0d..5b1ac7155 100644 --- a/pages/common/wget.md +++ b/pages/common/wget.md @@ -11,26 +11,26 @@ `wget -O {{bar}} {{https://example.com/foo}}` -- Download a single web page and all its resources (scripts, stylesheets, images, etc.): +- Download a single web page and all its resources with 3-second intervals between requests (scripts, stylesheets, images, etc.): -`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}}` +`wget --page-requisites --convert-links --wait=3 {{https://example.com/somepage.html}}` - Download all listed files within a directory and its sub-directories (does not download embedded page elements): `wget --mirror --no-parent {{https://example.com/somepath/}}` -- Download the contents of an URL via authenticated FTP: +- Limit the download speed and the number of connection retries: -`wget --ftp-user={{username}} --ftp-password={{password}} {{ftp://example.com}}` +`wget --limit-rate={{300k}} --tries={{100}} {{https://example.com/somepath/}}` + +- Download a file from an HTTP server using Basic Auth (also works for FTP): + +`wget --user={{username}} --password={{password}} {{https://example.com}}` - Continue an incomplete download: `wget -c {{https://example.com}}` -- Enable quiet mode to suppress output: +- Download all URLs stored in a text file to a specific directory: -`wget -q {{https://example.com}}` +`wget -P {{path/to/directory}} -i {{URLs.txt}}`