Re: mirroring a site locally using wget?
On Fri, Aug 15, 2008 at 05:13:16AM -0400, Zach Uram wrote:
> How exactly can I do this:
>
> There is a website I wish to mirror. It has many pages and images and
> it uses CSS.
>
> I wish to run wget and have it:
> 1) download all HTML/CSS/images
> 2) uses local references so <A
> HREF="http://site.org/images/image.jpg"> will be saved as <A
> HREF="images/image.jpg">
> 3) do the same thing for CSS etc.
Here is an example of a command we use to mirror a website. See the manpage for
the meaning of the switches. Don't just copy the command. For other websites
we use less switches and different ones:
/usr/bin/wget -E -np -r -k -K -N -l inf http://<website> &> /home/ftpadm/logs/websitename.log
Regards
Johann
--
Johann Spies Telefoon: 021-808 4036
Informasietegnologie, Universiteit van Stellenbosch
"And I say unto you, Ask, and it shall be given you;
seek, and ye shall find; knock, and it shall be opened
unto you." Luke 11:9
Reply to: