![]() This might seem superfluous-if the default for an affirmative option is to not do something, then why provide a way to explicitly turn it off? But the startup file may in fact change the default. For example, the documented existence of -follow-ftp assumes that the default is to not follow FTP links from HTML pages.Īffirmative options can be negated by prepending the -no- to the option name negative options can be negated by omitting the -no- prefix. Unless stated otherwise, it is assumed that the default behavior is the opposite of what the option accomplishes. All such options share several properties. A boolean option is either affirmative or negative (beginning with -no). For example, -follow-ftp tells Wget to follow FTP links from HTML files and, on the other hand, -no-glob tells it not to perform file globbing on FTP URLs. Most options that do not accept arguments are boolean options, so named because their state can be captured with a yes-or-no ("boolean") variable. wgetrc sets exclude_directories to /cgi-bin, the following example will first reset it, and then set it to exclude /~nobody and /~somebody. The options that accept comma-separated lists all respect the convention that specifying an empty list clears its value. ![]() So the following will try to download URL -x, reporting failure to log: wget -o log -x Since the options can be specified after the arguments, you may terminate them with. This is completely equivalent to: wget -d -r -c You may put several options that do not require arguments together, like: wget - d r c ![]() The space between the option accepting an argument and the argument may be omitted. Thus you may write: wget -r -tries=10 -o log You may freely mix different option styles, or specify options after the command-line arguments. Long options are more convenient to remember, but take time to type. Since Wget uses GNU getopt to process command-line arguments, every option has a long form along with the short one. If the server supports regetting, it will instruct the server to continue the download from where it left off. Wget has been designed for robustness over slow or unstable network connections if a download fails due to a network problem, it will keep retrying until the whole file has been retrieved. Wget can be instructed to convert the links in downloaded files to point at the local files, for offline viewing. This is sometimes referred to as "recursive downloading." While doing that, Wget respects the Robot Exclusion Standard ( /robots.txt). Wget can follow links in HTML, XHTML, and CSS pages, to create local versions of remote web sites, fully recreating the directory structure of the original site. By contrast, most of the Web browsers require constant user's presence, which can be a great hindrance when transferring a lot of data. This allows you to start a retrieval and disconnect from the system, letting Wget finish the work. Wget is non-interactive, meaning that it can work in the background, while the user is not logged on. ![]() It supports HTTP, HTTPS, and FTP protocols, as well as retrieval through HTTP proxies. GNU Wget is a free utility for non-interactive download of files from the Web.
0 Comments
Leave a Reply. |