Go to the first, previous, next, last section, table of contents.


3.1 Option Syntax

Since Wget uses GNU getopts to parse its arguments, every option has its short and long form. Long options are more convenient to remember, but take time to type. You may freely mix different option styles, or specify options after the command-line arguments. Thus you may write:

wget -r --tries=10 http://fly.cc.fer.hr/ -o log

The space between the option accepting an argument and the argument may be omitted. Instead `-o log' you can write `-olog'.

You may put several options that do not require arguments together, like:

wget -drc URL

This is a complete equivalent of:

wget -d -r -c URL

Since the options can be specified after the arguments, you may terminate them with `--'. So the following will try to download URL `-x', reporting failure to `log':

wget -o log -- -x

The options that accept comma-separated lists all use the convention that, when presented an empty list, it means to clear it. This can be useful to clear the `.wgetrc' settings. So, if your .wgetrc sets the exclude_directories to `/cgi-bin', the following example will first reset it, and then set it to exclude `/~nobody' and `/~somebody'. You can also clear the lists in `.wgetrc' (See section 7.2 Wgetrc Syntax).

wget -X " -X /~nobody,/~somebody


Go to the first, previous, next, last section, table of contents.