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/
Written by Kees Klerk
Related protips
1 Response
Nice breakdown, thanks for sharing!
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Wget
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#