我有一个设置 htaccess 的服务器。当我想从中下载文件时,我只需执行:
wget -r --user="user" --password="password" -q 'http://server'
所有文件都已下载,但在每个目录中wget
还会创建许多其他文件index.html?something
,我必须手动删除它们。是否可以不创建该文件?
See the --accept
and --reject
options, if your version of wget
suppors them:
-A acclist --accept acclist -R rejlist --reject rejlist
Specify comma-separated lists of file name suffixes or patterns to accept or reject. Note that if any of the wildcard characters, *, ?, [ or ], appear in an element of acclist or rejlist, it will be treated as a pattern, rather than a suffix.