Weblog entry #6 for nicc777
I finally have some time to contribute again...
There are many tools to mirror a site, and the most common is almost certain to be wget(1). The problem with these programs - CLI or GUI - is all the options available. In my case, I rarely have to fidle with the options. So, I created a simple brain-dead wrapper script to quickly grab an mirrir a directory from a web server:
#!/bin/sh # mirror a site tool => ms.sh # - - # usage: # # ms.sh BASEDIR URL # # What this program will do is to create (mkdir) the 'basedir' and then # run 'wget' in a mirror mode to dump the site in that directory. After # the download is complete, the script will write the source URL in a # file called source.txt. # MKDIR=/bin/mkdir WGET=/usr/bin/wget ECHO=/bin/echo $MKDIR -p $1 cd $1 $WGET -t 0 -nc -c -x -nH -r -l 5 -k -p -L -np $2 $ECHO $2 > $1/source.txt $ECHO '\nOperation Completed...\n\n'
Have fun...