Harry Putnam wrote:
> 
> Trying to exclude certain directories from a download.  I've trie
> about every syntax known to man but nothing is being excluded.
> 
> -X dir
> -X /dir
> -X "/dir"
> -X "dir"
> 
> --exclude dir
> --exclude "dir"
> 
> etc etc
> 
> Using the long option I get:
> /usr/local/bin/wget: option `--exclude' is ambiguous
> 
> Using the -X option nothing is excluded.  Can someone post a working
> example?
> 
> The examples in info do not work for me.  Not as they are written
> there at any rate.

Now let's see what the info pages has to say:

`-I LIST'
`--include LIST'
`include_directories = LIST'
     `-I' option accepts a comma-separated list of directories included
     in the retrieval.  Any other directories will simply be ignored.
     The directories are absolute paths.
                         ^^^^^^^^

     So, if you wish to download from `http://host/people/bozo/'
     following only links to bozo's colleagues in the `/people'
     directory and the bogus scripts in `/cgi-bin', you can specify:

          wget -I /people,/cgi-bin http://host/people/bozo/

`-X LIST'
`--exclude LIST'
`exclude_directories = LIST'
     `-X' option is exactly the reverse of `-I'--this is a list of
     directories _excluded_ from the download.  E.g. if you do not want
     Wget to download things from `/cgi-bin' directory, specify `-X
     /cgi-bin' on the command line.

     The same as with `-A'/`-R', these two options can be combined to
     get a better fine-tuning of downloading subdirectories.  E.g. if
     you want to load all the files from `/pub' hierarchy except for
     `/pub/worthless', specify `-I/pub -X/pub/worthless'.

Ah, it isn't that clearly said that it has to be an absolute path. But
the exemples are all using one. (You're welcome to provide a better
description for the info pages)

Making some test with wget version 1.6 shows that it works as described.
Even -X securescan works just as well as -X /securescan. But -X jobs
will not exclude /about/jobs/...

[hack@DUR0N2000 webs]$ wget -X securescan,i,css,press,jobs -r -l inf
http://www
.vigilante.com/

> 
> This is my second post on this... no one has offered any advice.
> Does the exclude option even work?

-- 
Med venlig hilsen / Kind regards

Hack Kampbjørn               [EMAIL PROTECTED]
HackLine                     +45 2031 7799

Reply via email to