Sign in to follow this  
Followers 0
natas

Grabbing directories with wget?

9 posts in this topic

how do you grab a whole directory and all files in it with wget?

0

Share this post


Link to post
Share on other sites
how do you grab a whole directory and all files in it with wget?

wget -r -l 1 --no-parent http://host.dom/dir/file.html

That'll get everything that's linked from file.html.. If indexing is on it'll try to get everything that's _really_ there..

Edited by duper
0

Share this post


Link to post
Share on other sites
how do you grab a whole directory and all files in it with wget?

wget -r -l 1 --no-parent http://host.dom/dir/file.html

That'll get everything that's linked from file.html.. If indexing is on it'll try to get everything that's _really_ there..

According to the manual page wget(1), this is the recommended syntax:

wget -m -k -K -E http://www.example.org/

0

Share this post


Link to post
Share on other sites

So if one wanted to download a whole site and all its files and .html source they could use wget? Is wget a command used under linux?

0

Share this post


Link to post
Share on other sites

indeed it is a linux program.

www.gnu.org/software/wget/wget.html

although there are windows versions

www.interlog.com/~tcharron/wgetwin.html

0

Share this post


Link to post
Share on other sites
So if one wanted to download a whole site and all its files and .html source they could use wget? Is wget a command used under linux?

Yes, but it has been ported to windows too.

0

Share this post


Link to post
Share on other sites

wget -r -l 1 --no-parent http://host.dom/dir/file.html

ok so this will grab all files and go 1 link deep? what if i was mirroring http://host.com/ and only wanted host.com and not any external sites it links to like say http://host.net? blackratchet said adding -D host.com would solve the problem? or is it -Dhost.com?

0

Share this post


Link to post
Share on other sites

you definitely want the space between D and host

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0