wget: Wgetrc Commands

1 
1 6.3 Wgetrc Commands
1 ===================
1 
1 The complete set of commands is listed below.  Legal values are listed
1 after the ‘=’.  Simple Boolean values can be set or unset using ‘on’ and
1 ‘off’ or ‘1’ and ‘0’.
1 
1    Some commands take pseudo-arbitrary values.  ADDRESS values can be
1 hostnames or dotted-quad IP addresses.  N can be any positive integer,
1 or ‘inf’ for infinity, where appropriate.  STRING values can be any
1 non-empty string.
1 
1    Most of these commands have direct command-line equivalents.  Also,
1 any wgetrc command can be specified on the command line using the
1 ‘--execute’ switch (⇒Basic Startup Options.)
1 
1 accept/reject = STRING
1      Same as ‘-A’/‘-R’ (⇒Types of Files).
1 
1 add_hostdir = on/off
1      Enable/disable host-prefixed file names.  ‘-nH’ disables it.
1 
1 ask_password = on/off
1      Prompt for a password for each connection established.  Cannot be
1      specified when ‘--password’ is being used, because they are
1      mutually exclusive.  Equivalent to ‘--ask-password’.
1 
1 auth_no_challenge = on/off
1      If this option is given, Wget will send Basic HTTP authentication
1      information (plaintext username and password) for all requests.
1      See ‘--auth-no-challenge’.
1 
1 background = on/off
1      Enable/disable going to background—the same as ‘-b’ (which enables
1      it).
1 
1 backup_converted = on/off
1      Enable/disable saving pre-converted files with the suffix
1      ‘.orig’—the same as ‘-K’ (which enables it).
1 
1 backups = NUMBER
1      Use up to NUMBER backups for a file.  Backups are rotated by adding
1      an incremental counter that starts at ‘1’.  The default is ‘0’.
1 
1 base = STRING
1      Consider relative URLs in input files (specified via the ‘input’
1      command or the ‘--input-file’/‘-i’ option, together with
1      ‘force_html’ or ‘--force-html’) as being relative to STRING—the
1      same as ‘--base=STRING’.
1 
1 bind_address = ADDRESS
1      Bind to ADDRESS, like the ‘--bind-address=ADDRESS’.
1 
1 ca_certificate = FILE
1      Set the certificate authority bundle file to FILE.  The same as
1      ‘--ca-certificate=FILE’.
1 
1 ca_directory = DIRECTORY
1      Set the directory used for certificate authorities.  The same as
1      ‘--ca-directory=DIRECTORY’.
1 
1 cache = on/off
1      When set to off, disallow server-caching.  See the ‘--no-cache’
1      option.
1 
1 certificate = FILE
1      Set the client certificate file name to FILE.  The same as
1      ‘--certificate=FILE’.
1 
1 certificate_type = STRING
1      Specify the type of the client certificate, legal values being
1      ‘PEM’ (the default) and ‘DER’ (aka ASN1).  The same as
1      ‘--certificate-type=STRING’.
1 
1 check_certificate = on/off
1      If this is set to off, the server certificate is not checked
1      against the specified client authorities.  The default is “on”.
1      The same as ‘--check-certificate’.
1 
1 connect_timeout = N
1      Set the connect timeout—the same as ‘--connect-timeout’.
1 
1 content_disposition = on/off
1      Turn on recognition of the (non-standard) ‘Content-Disposition’
1      HTTP header—if set to ‘on’, the same as ‘--content-disposition’.
1 
1 trust_server_names = on/off
1      If set to on, construct the local file name from redirection URLs
1      rather than original URLs.
1 
1 continue = on/off
1      If set to on, force continuation of preexistent partially retrieved
1      files.  See ‘-c’ before setting it.
1 
1 convert_links = on/off
1      Convert non-relative links locally.  The same as ‘-k’.
1 
1 cookies = on/off
1      When set to off, disallow cookies.  See the ‘--cookies’ option.
1 
1 cut_dirs = N
1      Ignore N remote directory components.  Equivalent to
1      ‘--cut-dirs=N’.
1 
1 debug = on/off
1      Debug mode, same as ‘-d’.
1 
1 default_page = STRING
1      Default page name—the same as ‘--default-page=STRING’.
1 
1 delete_after = on/off
1      Delete after download—the same as ‘--delete-after’.
1 
1 dir_prefix = STRING
1      Top of directory tree—the same as ‘-P STRING’.
1 
1 dirstruct = on/off
1      Turning dirstruct on or off—the same as ‘-x’ or ‘-nd’,
1      respectively.
1 
1 dns_cache = on/off
1      Turn DNS caching on/off.  Since DNS caching is on by default, this
1      option is normally used to turn it off and is equivalent to
1      ‘--no-dns-cache’.
1 
1 dns_timeout = N
1      Set the DNS timeout—the same as ‘--dns-timeout’.
1 
1 domains = STRING
1      Same as ‘-D’ (⇒Spanning Hosts).
1 
1 dot_bytes = N
1      Specify the number of bytes “contained” in a dot, as seen
1      throughout the retrieval (1024 by default).  You can postfix the
1      value with ‘k’ or ‘m’, representing kilobytes and megabytes,
1      respectively.  With dot settings you can tailor the dot retrieval
11      to suit your needs, or you can use the predefined “styles” (⇒
      Download Options).
1 
1 dot_spacing = N
1      Specify the number of dots in a single cluster (10 by default).
1 
1 dots_in_line = N
1      Specify the number of dots that will be printed in each line
1      throughout the retrieval (50 by default).
1 
1 egd_file = FILE
1      Use STRING as the EGD socket file name.  The same as
1      ‘--egd-file=FILE’.
1 
1 exclude_directories = STRING
1      Specify a comma-separated list of directories you wish to exclude
11      from download—the same as ‘-X STRING’ (⇒Directory-Based
      Limits).
1 
1 exclude_domains = STRING
1      Same as ‘--exclude-domains=STRING’ (⇒Spanning Hosts).
1 
1 follow_ftp = on/off
1      Follow FTP links from HTML documents—the same as ‘--follow-ftp’.
1 
1 follow_tags = STRING
1      Only follow certain HTML tags when doing a recursive retrieval,
1      just like ‘--follow-tags=STRING’.
1 
1 force_html = on/off
1      If set to on, force the input filename to be regarded as an HTML
1      document—the same as ‘-F’.
1 
1 ftp_password = STRING
1      Set your FTP password to STRING.  Without this setting, the
1      password defaults to ‘-wget@’, which is a useful default for
1      anonymous FTP access.
1 
1      This command used to be named ‘passwd’ prior to Wget 1.10.
1 
1 ftp_proxy = STRING
1      Use STRING as FTP proxy, instead of the one specified in
1      environment.
1 
1 ftp_user = STRING
1      Set FTP user to STRING.
1 
1      This command used to be named ‘login’ prior to Wget 1.10.
1 
1 glob = on/off
1      Turn globbing on/off—the same as ‘--glob’ and ‘--no-glob’.
1 
1 header = STRING
1      Define a header for HTTP downloads, like using ‘--header=STRING’.
1 
1 compression = STRING
1      Choose the compression type to be used.  Legal values are ‘auto’
1      (the default), ‘gzip’, and ‘none’.  The same as
1      ‘--compression=STRING’.
1 
1 adjust_extension = on/off
1      Add a ‘.html’ extension to ‘text/html’ or ‘application/xhtml+xml’
1      files that lack one, a ‘.css’ extension to ‘text/css’ files that
1      lack one, and a ‘.br’, ‘.Z’, ‘.zlib’ or ‘.gz’ to compressed files
1      like ‘-E’.  Previously named ‘html_extension’ (still acceptable,
1      but deprecated).
1 
1 http_keep_alive = on/off
1      Turn the keep-alive feature on or off (defaults to on).  Turning it
1      off is equivalent to ‘--no-http-keep-alive’.
1 
1 http_password = STRING
1      Set HTTP password, equivalent to ‘--http-password=STRING’.
1 
1 http_proxy = STRING
1      Use STRING as HTTP proxy, instead of the one specified in
1      environment.
1 
1 http_user = STRING
1      Set HTTP user to STRING, equivalent to ‘--http-user=STRING’.
1 
1 https_only = on/off
1      When in recursive mode, only HTTPS links are followed (defaults to
1      off).
1 
1 https_proxy = STRING
1      Use STRING as HTTPS proxy, instead of the one specified in
1      environment.
1 
1 ignore_case = on/off
1      When set to on, match files and directories case insensitively; the
1      same as ‘--ignore-case’.
1 
1 ignore_length = on/off
1      When set to on, ignore ‘Content-Length’ header; the same as
1      ‘--ignore-length’.
1 
1 ignore_tags = STRING
1      Ignore certain HTML tags when doing a recursive retrieval, like
1      ‘--ignore-tags=STRING’.
1 
1 include_directories = STRING
1      Specify a comma-separated list of directories you wish to follow
1      when downloading—the same as ‘-I STRING’.
1 
1 iri = on/off
1      When set to on, enable internationalized URI (IRI) support; the
1      same as ‘--iri’.
1 
1 inet4_only = on/off
1      Force connecting to IPv4 addresses, off by default.  You can put
1      this in the global init file to disable Wget’s attempts to resolve
1      and connect to IPv6 hosts.  Available only if Wget was compiled
1      with IPv6 support.  The same as ‘--inet4-only’ or ‘-4’.
1 
1 inet6_only = on/off
1      Force connecting to IPv6 addresses, off by default.  Available only
1      if Wget was compiled with IPv6 support.  The same as ‘--inet6-only’
1      or ‘-6’.
1 
1 input = FILE
1      Read the URLs from STRING, like ‘-i FILE’.
1 
1 keep_session_cookies = on/off
1      When specified, causes ‘save_cookies = on’ to also save session
1      cookies.  See ‘--keep-session-cookies’.
1 
1 limit_rate = RATE
1      Limit the download speed to no more than RATE bytes per second.
1      The same as ‘--limit-rate=RATE’.
1 
1 load_cookies = FILE
1      Load cookies from FILE.  See ‘--load-cookies FILE’.
1 
1 local_encoding = ENCODING
1      Force Wget to use ENCODING as the default system encoding.  See
1      ‘--local-encoding’.
1 
1 logfile = FILE
1      Set logfile to FILE, the same as ‘-o FILE’.
1 
1 max_redirect = NUMBER
1      Specifies the maximum number of redirections to follow for a
1      resource.  See ‘--max-redirect=NUMBER’.
1 
1 mirror = on/off
1      Turn mirroring on/off.  The same as ‘-m’.
1 
1 netrc = on/off
1      Turn reading netrc on or off.
1 
1 no_clobber = on/off
1      Same as ‘-nc’.
1 
1 no_parent = on/off
1      Disallow retrieving outside the directory hierarchy, like
1      ‘--no-parent’ (⇒Directory-Based Limits).
1 
1 no_proxy = STRING
1      Use STRING as the comma-separated list of domains to avoid in proxy
1      loading, instead of the one specified in environment.
1 
1 output_document = FILE
1      Set the output filename—the same as ‘-O FILE’.
1 
1 page_requisites = on/off
1      Download all ancillary documents necessary for a single HTML page
1      to display properly—the same as ‘-p’.
1 
1 passive_ftp = on/off
1      Change setting of passive FTP, equivalent to the ‘--passive-ftp’
1      option.
1 
1 password = STRING
1      Specify password STRING for both FTP and HTTP file retrieval.  This
1      command can be overridden using the ‘ftp_password’ and
1      ‘http_password’ command for FTP and HTTP respectively.
1 
1 post_data = STRING
1      Use POST as the method for all HTTP requests and send STRING in the
1      request body.  The same as ‘--post-data=STRING’.
1 
1 post_file = FILE
1      Use POST as the method for all HTTP requests and send the contents
1      of FILE in the request body.  The same as ‘--post-file=FILE’.
1 
1 prefer_family = none/IPv4/IPv6
1      When given a choice of several addresses, connect to the addresses
1      with specified address family first.  The address order returned by
1      DNS is used without change by default.  The same as
1      ‘--prefer-family’, which see for a detailed discussion of why this
1      is useful.
1 
1 private_key = FILE
1      Set the private key file to FILE.  The same as
1      ‘--private-key=FILE’.
1 
1 private_key_type = STRING
1      Specify the type of the private key, legal values being ‘PEM’ (the
1      default) and ‘DER’ (aka ASN1).  The same as
1      ‘--private-type=STRING’.
1 
1 progress = STRING
1      Set the type of the progress indicator.  Legal types are ‘dot’ and
1      ‘bar’.  Equivalent to ‘--progress=STRING’.
1 
1 protocol_directories = on/off
1      When set, use the protocol name as a directory component of local
1      file names.  The same as ‘--protocol-directories’.
1 
1 proxy_password = STRING
1      Set proxy authentication password to STRING, like
1      ‘--proxy-password=STRING’.
1 
1 proxy_user = STRING
1      Set proxy authentication user name to STRING, like
1      ‘--proxy-user=STRING’.
1 
1 quiet = on/off
1      Quiet mode—the same as ‘-q’.
1 
1 quota = QUOTA
1      Specify the download quota, which is useful to put in the global
1      ‘wgetrc’.  When download quota is specified, Wget will stop
1      retrieving after the download sum has become greater than quota.
1      The quota can be specified in bytes (default), kbytes ‘k’ appended)
1      or mbytes (‘m’ appended).  Thus ‘quota = 5m’ will set the quota to
1      5 megabytes.  Note that the user’s startup file overrides system
1      settings.
1 
1 random_file = FILE
1      Use FILE as a source of randomness on systems lacking
1      ‘/dev/random’.
1 
1 random_wait = on/off
1      Turn random between-request wait times on or off.  The same as
1      ‘--random-wait’.
1 
1 read_timeout = N
1      Set the read (and write) timeout—the same as ‘--read-timeout=N’.
1 
1 reclevel = N
1      Recursion level (depth)—the same as ‘-l N’.
1 
1 recursive = on/off
1      Recursive on/off—the same as ‘-r’.
1 
1 referer = STRING
1      Set HTTP ‘Referer:’ header just like ‘--referer=STRING’.  (Note
1      that it was the folks who wrote the HTTP spec who got the spelling
1      of “referrer” wrong.)
1 
1 relative_only = on/off
11      Follow only relative links—the same as ‘-L’ (⇒Relative
      Links).
1 
1 remote_encoding = ENCODING
1      Force Wget to use ENCODING as the default remote server encoding.
1      See ‘--remote-encoding’.
1 
1 remove_listing = on/off
1      If set to on, remove FTP listings downloaded by Wget.  Setting it
1      to off is the same as ‘--no-remove-listing’.
1 
1 restrict_file_names = unix/windows
1      Restrict the file names generated by Wget from URLs.  See
1      ‘--restrict-file-names’ for a more detailed description.
1 
1 retr_symlinks = on/off
1      When set to on, retrieve symbolic links as if they were plain
1      files; the same as ‘--retr-symlinks’.
1 
1 retry_connrefused = on/off
1      When set to on, consider “connection refused” a transient error—the
1      same as ‘--retry-connrefused’.
1 
1 robots = on/off
1      Specify whether the norobots convention is respected by Wget, “on”
1      by default.  This switch controls both the ‘/robots.txt’ and the
1      ‘nofollow’ aspect of the spec.  ⇒Robot Exclusion, for more
1      details about this.  Be sure you know what you are doing before
1      turning this off.
1 
1 save_cookies = FILE
1      Save cookies to FILE.  The same as ‘--save-cookies FILE’.
1 
1 save_headers = on/off
1      Same as ‘--save-headers’.
1 
1 secure_protocol = STRING
1      Choose the secure protocol to be used.  Legal values are ‘auto’
1      (the default), ‘SSLv2’, ‘SSLv3’, and ‘TLSv1’.  The same as
1      ‘--secure-protocol=STRING’.
1 
1 server_response = on/off
1      Choose whether or not to print the HTTP and FTP server
1      responses—the same as ‘-S’.
1 
1 show_all_dns_entries = on/off
1      When a DNS name is resolved, show all the IP addresses, not just
1      the first three.
1 
1 span_hosts = on/off
1      Same as ‘-H’.
1 
1 spider = on/off
1      Same as ‘--spider’.
1 
1 strict_comments = on/off
1      Same as ‘--strict-comments’.
1 
1 timeout = N
1      Set all applicable timeout values to N, the same as ‘-T N’.
1 
1 timestamping = on/off
11      Turn timestamping on/off.  The same as ‘-N’ (⇒
      Time-Stamping).
1 
1 use_server_timestamps = on/off
1      If set to ‘off’, Wget won’t set the local file’s timestamp by the
1      one on the server (same as ‘--no-use-server-timestamps’).
1 
1 tries = N
1      Set number of retries per URL—the same as ‘-t N’.
1 
1 use_proxy = on/off
1      When set to off, don’t use proxy even when proxy-related
1      environment variables are set.  In that case it is the same as
1      using ‘--no-proxy’.
1 
1 user = STRING
1      Specify username STRING for both FTP and HTTP file retrieval.  This
1      command can be overridden using the ‘ftp_user’ and ‘http_user’
1      command for FTP and HTTP respectively.
1 
1 user_agent = STRING
1      User agent identification sent to the HTTP Server—the same as
1      ‘--user-agent=STRING’.
1 
1 verbose = on/off
1      Turn verbose on/off—the same as ‘-v’/‘-nv’.
1 
1 wait = N
1      Wait N seconds between retrievals—the same as ‘-w N’.
1 
1 wait_retry = N
1      Wait up to N seconds between retries of failed retrievals only—the
1      same as ‘--waitretry=N’.  Note that this is turned on by default in
1      the global ‘wgetrc’.
1