How can I download a web server’s directory and all subdirectories with one command?
15th January 2012
My answer to How can I download a web server’s directory and all subdirectories with one command? on Quora
Use wget (you can install it with apt-get install wget)
$ wget --recursive http://example.com
That will create a directory called example.com and put the mirrored downloaded files in the right sub-directories inside it.
If you just want to download a subdirectory, do this:
$ wget --recursive http://example.com/subdirectory --no-parent
The --no-parent option ensures wget won’t follow links up to parent directories of the one you want to download.
More recent articles
- Qwen2.5-Coder-32B is an LLM that can code well that runs on my Mac - 12th November 2024
- Visualizing local election results with Datasette, Observable and MapLibre GL - 9th November 2024
- Project: VERDAD - tracking misinformation in radio broadcasts using Gemini 1.5 - 7th November 2024