mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-20 23:02:00 +00:00
Update cheatsheets
This commit is contained in:
14
tldr/wget
14
tldr/wget
@@ -15,28 +15,28 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Download the contents of a URL to a file (named "bar" in this case):
|
||||
|
||||
`wget --output-document {{bar}} {{https://example.com/foo}}`
|
||||
`wget {{[-O|--output-document]}} {{bar}} {{https://example.com/foo}}`
|
||||
|
||||
- Download a single web page and all its resources with 3-second intervals between requests (scripts, stylesheets, images, etc.):
|
||||
|
||||
`wget --page-requisites --convert-links --wait=3 {{https://example.com/somepage.html}}`
|
||||
`wget {{[-p|--page-requisites]}} {{[-k|--convert-links]}} {{[-w|--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/}}`
|
||||
`wget {{[-m|--mirror]}} {{[-np|--no-parent]}} {{https://example.com/somepath/}}`
|
||||
|
||||
- Limit the download speed and the number of connection retries:
|
||||
|
||||
`wget --limit-rate={{300k}} --tries={{100}} {{https://example.com/somepath/}}`
|
||||
`wget --limit-rate {{300k}} {{[-t|--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}}`
|
||||
`wget --user {{username}} --password {{password}} {{https://example.com}}`
|
||||
|
||||
- Continue an incomplete download:
|
||||
|
||||
`wget --continue {{https://example.com}}`
|
||||
`wget {{[-c|--continue]}} {{https://example.com}}`
|
||||
|
||||
- Download all URLs stored in a text file to a specific directory:
|
||||
|
||||
`wget --directory-prefix {{path/to/directory}} --input-file {{URLs.txt}}`
|
||||
`wget {{[-P|--directory-prefix]}} {{path/to/directory}} {{[-i|--input-file]}} {{URLs.txt}}`
|
||||
|
||||
Reference in New Issue
Block a user