Created
October 16, 2012 14:17
-
-
Save alghanmi/3899526 to your computer and use it in GitHub Desktop.
Mirror a website using wget
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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