wget: Option Syntax

1 
1 2.2 Option Syntax
1 =================
1 
1 Since Wget uses GNU getopt to process command-line arguments, every
1 option has a long form along with the short one.  Long options are more
1 convenient to remember, but take time to type.  You may freely mix
1 different option styles, or specify options after the command-line
1 arguments.  Thus you may write:
1 
1      wget -r --tries=10 http://fly.srk.fer.hr/ -o log
1 
1    The space between the option accepting an argument and the argument
1 may be omitted.  Instead of ‘-o log’ you can write ‘-olog’.
1 
1    You may put several options that do not require arguments together,
1 like:
1 
1      wget -drc URL
1 
1    This is completely equivalent to:
1 
1      wget -d -r -c URL
1 
1    Since the options can be specified after the arguments, you may
1 terminate them with ‘--’.  So the following will try to download URL
1 ‘-x’, reporting failure to ‘log’:
1 
1      wget -o log -- -x
1 
1    The options that accept comma-separated lists all respect the
1 convention that specifying an empty list clears its value.  This can be
1 useful to clear the ‘.wgetrc’ settings.  For instance, if your ‘.wgetrc’
1 sets ‘exclude_directories’ to ‘/cgi-bin’, the following example will
1 first reset it, and then set it to exclude ‘/~nobody’ and ‘/~somebody’.
1 You can also clear the lists in ‘.wgetrc’ (⇒Wgetrc Syntax).
1 
1      wget -X '' -X /~nobody,/~somebody
1 
1    Most options that do not accept arguments are “boolean” options, so
1 named because their state can be captured with a yes-or-no (“boolean”)
1 variable.  For example, ‘--follow-ftp’ tells Wget to follow FTP links
1 from HTML files and, on the other hand, ‘--no-glob’ tells it not to
1 perform file globbing on FTP URLs.  A boolean option is either
1 “affirmative” or “negative” (beginning with ‘--no’).  All such options
1 share several properties.
1 
1    Unless stated otherwise, it is assumed that the default behavior is
1 the opposite of what the option accomplishes.  For example, the
1 documented existence of ‘--follow-ftp’ assumes that the default is to
1 _not_ follow FTP links from HTML pages.
1 
1    Affirmative options can be negated by prepending the ‘--no-’ to the
1 option name; negative options can be negated by omitting the ‘--no-’
1 prefix.  This might seem superfluous—if the default for an affirmative
1 option is to not do something, then why provide a way to explicitly turn
1 it off?  But the startup file may in fact change the default.  For
1 instance, using ‘follow_ftp = on’ in ‘.wgetrc’ makes Wget _follow_ FTP
1 links by default, and using ‘--no-follow-ftp’ is the only way to restore
1 the factory default from the command line.
1