Forrest logo
back to the wget tool

wget:tldr:09b2a

wget: 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-}
try on your machine

This command uses the "wget" command-line utility to download a website and its entire contents. Here's what each option does:

  • --mirror: This option tells wget to mirror the website, which means it will download all the files necessary to reproduce the site locally. This includes HTML files, images, stylesheets, scripts, etc.

  • --no-parent: This option restricts wget from downloading files from any parent directories of the specified URL. It ensures that only files from the specified URL (and its subdirectories) are downloaded.

  • ${https:--example-com-somepath-}: This is the URL of the website you want to mirror. You should replace this placeholder with the actual URL you want to download. For example, if you want to download the website "https://example.com/somepath/", you would replace ${https:--example-com-somepath-} with https://example.com/somepath/.

Overall, this command downloads all the files from a website and its subdirectories, while excluding any files from parent directories.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the wget tool