我有一个bash脚本,它启动一系列wget命令并记录输出。我使用以下选项:
wget --no-verbose --page-requisites --adjust-extension --convert-links --backup-converted --timestamping --wait=1 --random-wait --append-output="$logfile" --recursive --level=2 http://example.com
日志应以:
Terminé — 2014-10-09 18:06:40 —
Temps total effectif : 1m 7s
Téléchargés : 11 fichiers, 79K en 0,06s (1,22 MB/s)
但有时候没有这样的总结,我看到的只是发生的错误:
http://example.com/robots.txt:
2014-10-09 18:06:41 erreur 404 : Ce fichier n'existe pas (404).
http://example.com/index.html:
2014-10-09 18:08:27 erreur 404 : Ce fichier n'existe pas (404).
http://example.com/folder1/folder2/default.asp.html:
2014-10-09 18:08:31 erreur 404 : Ce fichier n'existe pas (404).
http://example.com/folder1/index.html:
2014-10-09 18:08:56 erreur 404 : Ce fichier n'existe pas (404).
http://example.com/folder1/folder2/folder3/"../images/bullet.gif":
2014-10-09 18:09:28 erreur 403 : Action interdite.
为什么不显示摘要?是因为没有下载新文件,还是因为出现了很多服务器错误(404,403)?
如果所有你看到的是发生了错误,那么我想这意味着WGET无法获取任何东西。如果没有下载任何内容,最后您将看不到统计信息。
—
Vinayak 2014年