Wget Command

Exmples how to use wget

These are common wget commands

  • Download a URL to a file
    wget -O filename "{{url}}"
  • Limit download speed
    wget --limit-rate={{200k}} {{url}}
  • Continue an incomplete download
    wget -c {{url}}
  • Download a full website
    wget --mirror -p --convert-links -P {{target_folder}} {{url}}
  • 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}}
  • 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 a file from an HTTP server using Basic Auth (also works for FTP)
    wget --user={{username}} --password={{password}} {{https://example.com}}
  • FTP download with username and password
    wget --ftp-user={{username}} --ftp-password={{password}} {{url}}
  • Download all URLs stored in a text file to a specific directory
    wget -P {{path/to/directory}} -i {{URLs.txt}}