Skip to content

Instantly share code, notes, and snippets.

@alghanmi
Created October 16, 2012 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alghanmi/3899526 to your computer and use it in GitHub Desktop.
Save alghanmi/3899526 to your computer and use it in GitHub Desktop.
Mirror a website using wget
#!/bin/bash
MIRROR_LOCATION=$HOME/public_html/mirror/
WEBSITE=""
# Mirror sir-lab & 585 Website
/usr/usc/bin/wget --mirror --no-parent --directory-prefix=$MIRROR_LOCATION --quiet $WEBSITE
# Fix permissions to make files available online
find $MIRROR_LOCATION -type f -exec chmod 644 {} \;
find $MIRROR_LOCATION -type d -exec chmod 755 {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment