LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Wget - syntax question (http://www.linuxquestions.org/questions/linux-software-2/wget-syntax-question-229197/)

satimis 09-11-2004 02:00 AM

Wget - syntax question
 
Hi folks,

What will be the correct sytnax to download a document from a website including all links but excluding mother-diretories/folders, e.g.

The document named CDoc, under www.abc.com/dir_1/dir_2/dir_3/CDoc/

# wget -r www.abc.com/dir_1/dir_2/dir_3/CDoc/

download all directories/folders above. I only need /CDoc/

TIA

B.R.
satimis

homey 09-11-2004 02:34 AM

I use --cut-dirs=# where is the number of directories before the one you want.

For example, if I want to get the SRPMS from this site, that has 9 directories before it.
Code:

wget -cm -nH --passive --cut-dirs=9 \
ftp://mirror.dulug.duke.edu \
/ftp.redhat.com/pub/redhat/linux/enterprise/3/en/os/i386/SRPMS


satimis 09-11-2004 04:28 AM

Hi homey,

Tks for your advice.
Code:

wget -cm -nH --passive --cut-dirs=9 \
ftp://mirror.dulug.duke.edu \
/ftp.redhat.com/pub/redhat/linux/enterprise/3/en/os/i386/SRPMS

On man wget

-cm
m=mirror
c=continure=r

Re '--cut-dirs=9'
wiil www.abc.com be counted as 1 (one) directory?

If I'm wrong please correct me.

TIA

B.R.
satimis

satimis 09-11-2004 04:29 AM

Hi homey,

Tks for your advice.
Code:

wget -cm -nH --passive --cut-dirs=9 \
ftp://mirror.dulug.duke.edu \
/ftp.redhat.com/pub/redhat/linux/enterprise/3/en/os/i386/SRPMS

On man wget

-cm
m=mirror
c=continure=r

Re '--cut-dirs=9'
wiil www.abc.com be counted as 1 (one) directory?

If I'm wrong please correct me.

TIA

B.R.
satimis


All times are GMT -5. The time now is 02:29 AM.