Skip to content

Instantly share code, notes, and snippets.

@Hagith
Created April 11, 2013 12:54
Show Gist options
  • Save Hagith/5363152 to your computer and use it in GitHub Desktop.
Save Hagith/5363152 to your computer and use it in GitHub Desktop.
Create a mirror of a website with Wget
#!/bin/bash
if [[ '' == $1 || '' == $2 ]]; then
echo "Provide domain name and URL"
exit 1
fi
wget \
--recursive \
--no-clobber \
--page-requisites \
--html-extension \
--convert-links \
--restrict-file-names=windows \
--domains $1 \
--no-parent \
$2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment