A better way to mirror websites

For quickly mirroring something, this should suffice:

#!/bin/bash
wget -mk -w 2 -np $1

Put that somewhere in your $PATH, name it, say, wgetsite, and when you feel the urge to mirror something just call it. For example, wgetsite http://www.grymoire.com/Unix/ will mirror The Grymoire’s Unix tutorials page, the tutorials, and the resources needed by them. It won’t mirror the whole website because of the -np option (quickmirror doesn’t use that, IIRC).
It can just as well mirror a single page, by the way, but it’ll put it in a hierarchy rather than just leave it randomly on your HDD. Organization rocks. :P

About these ads


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.