Last Updated: March 02, 2016
·
466
· koos303

Download all specified files recursively from a website using wget

This example downloads all torrent files from the Debian website and puts them in the current directory.

#!/bin/bash
# -A,  --accept=LIST        comma-separated list of accepted extensions.
# -m,  --mirror             shortcut for -N -r -l inf --no-remove-listing.
# -p,  --page-requisites    get all images, etc. needed to display HTML page.
# -E,  --adjust-extension   save HTML/CSS documents with proper extensions.
# -k,  --convert-links      make links in downloaded HTML or CSS point to
# -K,  --backup-converted   before converting file X, back up as X.orig.
# -np, --no-parent          don't ascend to the parent directory.
# -nd, --no-directories     don't create directories.
wget -A torrent -m -p -E -k -K -np -nd http://cdimage.debian.org/debian-cd/current/

1 Response
Add your response

Nice breakdown, thanks for sharing!

over 1 year ago ·