Skip to content

Instantly share code, notes, and snippets.

@pirafrank
Last active April 7, 2022 02:52
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pirafrank/181360a3754abe79a5c8 to your computer and use it in GitHub Desktop.
Save pirafrank/181360a3754abe79a5c8 to your computer and use it in GitHub Desktop.
Quick script that use wget to download an entire website
#!/bin/bash
if [[ $# != 2 ]]; then
echo "Error: wrong number of arguments"
echo ""
echo "Usage: ./download-entire-website.sh <domain> <url>"
echo "Example ./download-entire-website.sh websitetodownload.com www.websitetodownload.com/page/"
echo ""
exit -1
fi
wget --recursive --no-clobber --page-requisites --html-extension --convert-links --restrict-file-names=windows --domain "$1" --no-parent "$2"
# Credits to techotopia.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment