up vote 1 down vote favorite
1
share [g+] share [fb]

i have a web directory that has many folders and many sub folders containing files.

i need to download everything using wget or bash.

link|improve this question
feedback

migrated from stackoverflow.com Feb 4 '10 at 1:42

This question came from our site for professional and enthusiast programmers.

7 Answers

Try: wget -r and see if that works.

link|improve this answer
feedback

The best way is:

wget -m <url>

Which is short for wget "mirror":

  -m,  --mirror             shortcut for -N -r -l inf --no-remove-listing.
link|improve this answer
feedback

See Wget Recursive Retrieval.

wget -r -l 5 -O whatever http://example.com/
link|improve this answer
feedback

"curl is a command line tool for transferring data with URL syntax, supporting FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS"

link text

link|improve this answer
missed the wget tag eh? – Byron Whitlock Feb 3 '10 at 22:48
feedback

you could use wget to mirror the directory structure. Did that with my prof's website on a daily basis. very handy ;-)

link|improve this answer
feedback

You have a web directory? Is it situated on a remote machine and you can only access it through HTTP, or do you have shell access? Your mention of bash implies shell access, unless you mean using wget from the bash prompt.

Wget is not always very efficient so if you have shell access to the machine where the web directory is located and you want to download it, you could do this

$ tar cjf webdir.tar.bz2 webdir 

and then transfer the archive with ftp or scp.

link|improve this answer
feedback

You could also try the following if you have an FTP account:

lftp USER:PASSWORD@FTPSERVER -e "mirror&&exit"
link|improve this answer
feedback

Your Answer

 
or
required, but never shown