Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi folks,
FedoraCore2
==========If I want to down a directory, say CCC from a website
WEBSITE -> AAA -> BBB -> CCC
Previously I used following command on terminal;
$ wget -no--parent [url]http://www.xyz.com/AAA/BBB/CCC/index.htm[/url]
then it will only download "CCC"
/CCC/index.htmNow I use
$ wget -np -r [url]http://www.xyz.com/AAA/BBB/CCC/index.htm[/url]It also downloaded the parent directories "www.xyz", AAA, BBB.
Please advise the correct syntax/command line to be used. TIA
B.R.
satimis

Try using:
$ wget -np -r -l 1 http://www.xyz.com/AAA/BBB/CCC/index.htmNB That's "-l 1" for "--level=1" which restricts the recursion level to one.

Hi 3Dave,
Tks for your advice.
Sorry
$ wget -np -r -l 1 http://www.xyz.com/AAA/BBB/CCC/index.htm
did not work.Directories
www.xyz.com
AAA
BBBall copied. What I need is only
CCC/index.htm
B.R.
satimis

Hi 3Dave,
$ wget http://www.xyz.com/AAA/BBB/CCC/index.htm
will download all directories/folders abovewget -m -c -np -nH --cut-dirs=2 -U Explorer http://www.xyz.com/AAA/BBB/CCC/index.htm
Works for me only downloading
BBB/CCC/indexB.R.
satimis

Check that you haven't enabled recursive downloading in your ~/.wgetrc or /etc/wgetrc.
$ wget http://www.xyz.com/AAA/BBB/CCC/index.htm
should download only index.htm, I've just tried it with this page and it just downloaded the page and nothing else.$ wget http://www.computing.net/linux/wwwboard/forum/26899.html
--14:45:16-- http://www.computing.net/linux/wwwboard/forum/26899.html
=> `26899.html'
Resolving www.computing.net... 69.93.141.100
Connecting to www.computing.net[69.93.141.100]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html][ <=> ] 18,356 54.28K/s
14:45:17 (54.00 KB/s) - `26899.html' saved [18356]
$

Hi 3Dave,
>Check that you haven't enabled recursive
>downloading in your ~/.wgetrc or /etc/wgetrc.Something strange happened here on "wget"
# cat /etc/wgetrc
.....
reclevel = 1 (also tried '5')
waitretry = 10
#recursive = off (also tried uncomment it)
.....$ wget http://kristi.erdves.lt/books/Computah%20Stuff/unix-linux/Teach_Yourself_Shell_Programming_In_24hrs.tar/ewtoc.html
only the index.html page downloaded. If uncomment "recursive = off", nothing downloaded.
I must add "-r" option. But it downloaded the parent directories above;
kristi.erdves.lt/books/Computah\ Stuff/unix-linux/Teach_Yourself_Shell_Programming_In_24hrs.tar/
B.R.
satimis

This worked for me:
$ wget -r -L -nH -np --cut-dirs=4 http://kristi.erdves.lt/books/Computah%20Stuff/unix-linux/Teach_Yourself_Shell_Programming_In_24hrs.tar/

Hi 3Dave,
Your advice also worked for me. But changing "--cut-dirs=4" to "--cut-dirs=3" will keep the folder "Teach_Yourself_Shell_Programming_In_24hrs.tar"
B.R.
satimis

![]() |
ipchains state INVALID,NE...
|
the command netstat
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |