Chinaunix首页 | 论坛 | 博客

分类: LINUX

2011-10-11 15:53:38

   每一个长选项基本都对应一个短选项。长选项后面带有参数。

 -V, --version 显示wget的版本后退出
  -h, --help 打印语法帮助  
 -b, --background 启动后转入后台执行  
 -e, --execute=COMMAND 执行`.wgetrc'格式的命令,wgetrc格式参见/etc/wgetrc或~/.wgetrc  
 ●记录和输入文件:   
-o, --output-file=FILE 把记录写到FILE文件中  
 -a, --append-output=FILE 把记录追加到FILE文件中  
 -d, --debug 打印调试输出  
 -q, --quiet 安静模式(没有输出)
  -v, --verbose 冗长模式(这是缺省设置)  
 -nv, --non-verbose 关掉冗长模式,但不是安静模式  
 -i, --input-file=FILE 下载在FILE文件中出现的URLs  
 -F, --force-html 把输入文件当作HTML格式文件对待  
 -B, --base=URL 将URL作为在-F -i参数指定的文件中出现的相对链接的前缀   
--sslcertfile=FILE 可选客户端证书  
 --sslcertkey=KEYFILE 可选客户端证书的KEYFILE
  --egd-file=FILE 指定EGD socket的文件名  
 ●下载:
  --bind-address=ADDRESS 指定本地使用地址(主机名或IP,当本地有多个IP或名字时使用)  
 -t, --tries=NUMBER 设定最大尝试链接次数(0 表示无限制).  
 -O --output-document=FILE 把文档写到FILE文件中  
 -nc, --no-clobber 不要覆盖存在的文件或使用.#前缀  
 -c, --continue 接着下载没下载完的文件  
 --progress=TYPE 设定进程条标记  
 -N, --timestamping 不要重新下载文件除非比本地文件新
 -S, --server-response 打印服务器的回应  
 --spider 不下载任何东西  
 -T, --timeout=SECONDS 设定响应超时的秒数   
-w, --wait=SECONDS 两次尝试之间间隔SECONDS秒   
--waitretry=SECONDS 在重新链接之间等待1...SECONDS秒   
--random-wait 在下载之间等待0...2*WAIT秒  
 -Y, --proxy=on/off 打开或关闭代理  
 -Q, --quota=NUMBER 设置下载的容量限制  
 --limit-rate=RATE 限定下载输率  
 ●目录:  
 -nd --no-directories 不创建目录  
 -x, --force-directories 强制创建目录  
 -nH, --no-host-directories 不创建主机目录  
 -P, --directory-prefix=PREFIX 将文件保存到目录 PREFIX/...  
 --cut-dirs=NUMBER 忽略 NUMBER层远程目录   
●HTTP 选项:  
 --http-user=USER 设定HTTP用户名为 USER.  
 --http-passwd=PASS 设定http密码为 PASS.  
 -C, --cache=on/off 允许/不允许服务器端的数据缓存 (一般情况下允许).
  -E, --html-extension 将所有text/html文档以.html扩展名保存  
 --ignore-length 忽略 `Content-Length'头域  
 --header=STRING 在headers中插入字符串 STRING  
 --proxy-user=USER 设定代理的用户名为 USER   
--proxy-passwd=PASS 设定代理的密码为 PASS   
--referer=URL 在HTTP请求中包含 `Referer: URL'头
-s, --save-headers 保存HTTP头到文件  
 -U, --user-agent=AGENT 设定代理的名称为 AGENT而不是 Wget/VERSION.  
 --no-http-keep-alive 关闭 HTTP活动链接 (永远链接).   
--cookies=off 不使用 cookies.   
--load-cookies=FILE 在开始会话前从文件 FILE中加载cookie  
 --save-cookies=FILE 在会话结束后将 cookies保存到 FILE文件中  
 ●FTP 选项:   
-nr, --dont-remove-listing 不移走 `.listing'文件  
 -g, --glob=on/off 打开或关闭文件名的 globbing机制  
 --passive-ftp 使用被动传输模式 (缺省值).  
 --active-ftp 使用主动传输模式  
 --retr-symlinks 在递归的时候,将链接指向文件(而不是目录)  
 ●递归下载:  
 -r, --recursive 递归下载--慎用!  
 -l, --level=NUMBER 最大递归深度 (inf 或 0 代表无穷).  
 --delete-after 在现在完毕后局部删除文件  
 -k, --convert-links 转换非相对链接为相对链接  
 -K, --backup-converted 在转换文件X之前,将之备份为 X.orig  
 -m, --mirror 等价于 -r -N -l inf -nr.  
 -p, --page-requisites 下载显示HTML文件的所有图片  
 ●递归下载中的包含和不包含(accept/reject):  
 -A, --accept=LIST 分号分隔的被接受扩展名的列表
  -R, --reject=LIST 分号分隔的不被接受的扩展名的列表  
 -D, --domains=LIST 分号分隔的被接受域的列表
  --exclude-domains=LIST 分号分隔的不被接受的域的列表  
 --follow-ftp 跟踪HTML文档中的FTP链接   
--follow-tags=LIST 分号分隔的被跟踪的HTML标签的列表
  -G, --ignore-tags=LIST 分号分隔的被忽略的HTML标签的列表
  -H, --span-hosts 当递归时转到外部主机   
-L, --relative 仅仅跟踪相对链接   
-I, --include-directories=LIST 允许目录的列表
  -X, --exclude-directories=LIST 不被包含目录的列表   
-np, --no-parent 不要追溯到父目录
157 static struct cmdline_option option_data[] =
 158   {
 159     { "accept", 'A', OPT_VALUE, "accept", -1 },
 160     { "adjust-extension", 'E', OPT_BOOLEAN, "adjustextension", -1 },
 161     { "append-output", 'a', OPT__APPEND_OUTPUT, NULL, required_argument },
 162     { "ask-password", 0, OPT_BOOLEAN, "askpassword", -1 },
 163     { "auth-no-challenge", 0, OPT_BOOLEAN, "authnochallenge", -1 },
 164     { "background", 'b', OPT_BOOLEAN, "background", -1 },
 165     { "backup-converted", 'K', OPT_BOOLEAN, "backupconverted", -1 },
 166     { "backups", 0, OPT_BOOLEAN, "backups", -1 },
 167     { "base", 'B', OPT_VALUE, "base", -1 },
 168     { "bind-address", 0, OPT_VALUE, "bindaddress", -1 },
 169     { IF_SSL ("ca-certificate"), 0, OPT_VALUE, "cacertificate", -1 },
 170     { IF_SSL ("ca-directory"), 0, OPT_VALUE, "cadirectory", -1 },
 171     { "cache", 0, OPT_BOOLEAN, "cache", -1 },
 172     { IF_SSL ("certificate"), 0, OPT_VALUE, "certificate", -1 },
 173     { IF_SSL ("certificate-type"), 0, OPT_VALUE, "certificatetype", -1 },
 174     { IF_SSL ("check-certificate"), 0, OPT_BOOLEAN, "checkcertificate", -1 },
 175     { "clobber", 0, OPT__CLOBBER, NULL, optional_argument },
 176     { "config", 0, OPT_VALUE, "chooseconfig", -1 },
 177     { "connect-timeout", 0, OPT_VALUE, "connecttimeout", -1 },
 178     { "continue", 'c', OPT_BOOLEAN, "continue", -1 },
 179     { "convert-links", 'k', OPT_BOOLEAN, "convertlinks", -1 },
 180     { "content-disposition", 0, OPT_BOOLEAN, "contentdisposition", -1 },
 181     { "cookies", 0, OPT_BOOLEAN, "cookies", -1 },
 182     { "cut-dirs", 0, OPT_VALUE, "cutdirs", -1 },
 183     { WHEN_DEBUG ("debug"), 'd', OPT_BOOLEAN, "debug", -1 },
 184     { "default-page", 0, OPT_VALUE, "defaultpage", -1 },
 185     { "delete-after", 0, OPT_BOOLEAN, "deleteafter", -1 },
 186     { "directories", 0, OPT_BOOLEAN, "dirstruct", -1 },
187     { "directory-prefix", 'P', OPT_VALUE, "dirprefix", -1 },
 188     { "dns-cache", 0, OPT_BOOLEAN, "dnscache", -1 },
 189     { "dns-timeout", 0, OPT_VALUE, "dnstimeout", -1 },
 190     { "domains", 'D', OPT_VALUE, "domains", -1 },
 191     { "dont-remove-listing", 0, OPT__DONT_REMOVE_LISTING, NULL, no_argument },
 192     { "dot-style", 0, OPT_VALUE, "dotstyle", -1 }, /* deprecated */
 193     { "egd-file", 0, OPT_VALUE, "egdfile", -1 },
 194     { "exclude-directories", 'X', OPT_VALUE, "excludedirectories", -1 },
 195     { "exclude-domains", 0, OPT_VALUE, "excludedomains", -1 },
 196     { "execute", 'e', OPT__EXECUTE, NULL, required_argument },
 197     { "follow-ftp", 0, OPT_BOOLEAN, "followftp", -1 },
 198     { "follow-tags", 0, OPT_VALUE, "followtags", -1 },
 199     { "force-directories", 'x', OPT_BOOLEAN, "dirstruct", -1 },
 200     { "force-html", 'F', OPT_BOOLEAN, "forcehtml", -1 },
 201     { "ftp-password", 0, OPT_VALUE, "ftppassword", -1 },
 202 #ifdef __VMS
 203     { "ftp-stmlf", 0, OPT_BOOLEAN, "ftpstmlf", -1 },
 204 #endif /* def __VMS */
 205     { "ftp-user", 0, OPT_VALUE, "ftpuser", -1 },
 206     { "glob", 0, OPT_BOOLEAN, "glob", -1 },
 207     { "header", 0, OPT_VALUE, "header", -1 },
 208     { "help", 'h', OPT_FUNCALL, (void *)print_help, no_argument },
 209     { "host-directories", 0, OPT_BOOLEAN, "addhostdir", -1 },
 210     { "html-extension", 'E', OPT_BOOLEAN, "adjustextension", -1 }, /* deprecated      */
 211     { "htmlify", 0, OPT_BOOLEAN, "htmlify", -1 },
 212     { "http-keep-alive", 0, OPT_BOOLEAN, "httpkeepalive", -1 },
 213     { "http-passwd", 0, OPT_VALUE, "httppassword", -1 }, /* deprecated */
 214     { "http-password", 0, OPT_VALUE, "httppassword", -1 },

 215     { "http-user", 0, OPT_VALUE, "httpuser", -1 },
 216     { "ignore-case", 0, OPT_BOOLEAN, "ignorecase", -1 },
 217     { "ignore-length", 0, OPT_BOOLEAN, "ignorelength", -1 },
 218     { "ignore-tags", 0, OPT_VALUE, "ignoretags", -1 },
 219     { "include-directories", 'I', OPT_VALUE, "includedirectories", -1 },
 220 #ifdef ENABLE_IPV6
 221     { "inet4-only", '4', OPT_BOOLEAN, "inet4only", -1 },
 222     { "inet6-only", '6', OPT_BOOLEAN, "inet6only", -1 },
 223 #endif
 224     { "input-file", 'i', OPT_VALUE, "input", -1 },
 225     { "iri", 0, OPT_BOOLEAN, "iri", -1 },
 226     { "keep-session-cookies", 0, OPT_BOOLEAN, "keepsessioncookies", -1 },
 227     { "level", 'l', OPT_VALUE, "reclevel", -1 },
 228     { "limit-rate", 0, OPT_VALUE, "limitrate", -1 },
 229     { "load-cookies", 0, OPT_VALUE, "loadcookies", -1 },
 230     { "local-encoding", 0, OPT_VALUE, "localencoding", -1 },
 231     { "max-redirect", 0, OPT_VALUE, "maxredirect", -1 },
 232     { "mirror", 'm', OPT_BOOLEAN, "mirror", -1 },
 233     { "no", 'n', OPT__NO, NULL, required_argument },
 234     { "no-clobber", 0, OPT_BOOLEAN, "noclobber", -1 },
 235     { "no-parent", 0, OPT_BOOLEAN, "noparent", -1 },
 236     { "output-document", 'O', OPT_VALUE, "outputdocument", -1 },
 237     { "output-file", 'o', OPT_VALUE, "logfile", -1 },
 238     { "page-requisites", 'p', OPT_BOOLEAN, "pagerequisites", -1 },
 239     { "parent", 0, OPT__PARENT, NULL, optional_argument },
 240     { "passive-ftp", 0, OPT_BOOLEAN, "passiveftp", -1 },
 241     { "password", 0, OPT_VALUE, "password", -1 },
 242     { "post-data", 0, OPT_VALUE, "postdata", -1 },
 243     { "post-file", 0, OPT_VALUE, "postfile", -1 },
 244     { "prefer-family", 0, OPT_VALUE, "preferfamily", -1 },
 245     { "preserve-permissions", 0, OPT_BOOLEAN, "preservepermissions", -1 }, /* dep     recated */. . . . .  .
258     { "random-wait", 0, OPT_BOOLEAN, "randomwait", -1 },
 259     { "read-timeout", 0, OPT_VALUE, "readtimeout", -1 },
 260     { "recursive", 'r', OPT_BOOLEAN, "recursive", -1 },
. . . . . .
 287     { "wait", 'w', OPT_VALUE, "wait", -1 },
 288     { "waitretry", 0, OPT_VALUE, "waitretry", -1 },
 

阅读(747) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~