2006-09-30

认识wget的另外几个选项

控制下载文件的总量。当流量有限制时,这是一个很好的选项。
-Q quota
--quota=quota

Specify download quota for automatic retrievals. The value can be specified in bytes (default), kilobytes (with k suffix), or megabytes (with m suffix).

Note that quota will never affect downloading a single file. So if you specify
wget -Q10k ftp://wuarchive.wustl.edu/ls-lR.gz
all of the ls-lR.gz will be downloaded.
The same goes even when several URLs are specified on the command-line. However, quota is respected when retrieving either recursively, or from an input file. Thus you may safely type wget -Q2m -i sites---download will be aborted when the quota is exceeded.

Setting quota to 0 or to inf unlimits the download quota.

控制文件下载类型和文件所属域名
-A acclist --accept acclist
-R rejlist --reject rejlist
Specify comma-separated lists of file name suffixes or patterns to accept or reject.
You want to download all the GIFs from a directory on an HTTP server.  You tried wget http://www.server.com/dir/*.gif, but that didn't work because HTTP retrieval does not support globbing.  In that case, use:
wget -r -l1 --no-parent -A.gif http://www.server.com/dir/

-A.gif means to download only the GIF files, -A "*.gif" would have worked too.
-D domain-list
--domains=domain-list
Set domains to be followed. domain-list is a comma-separated list of domains. Note that it does not turn on -H.

--exclude-domains domain-list
Specify the domains that are not to be followed.

指定文件下载后保存的目录
-P

没有评论:

发表评论