wget递归下载整站

由于线上跑的系统还有CentOS5.4、6.4、6.5、6.5、6.6、6.8,而各镜像站维护的最早的版本已经是6.9,所以需要爬archive站点的rpm包来自建yum仓库。

wget -r -p -np -k http://archives.fedoraproject.org/pub/archive/epel/5Server/x86_64/
wget -r -p -np -k http://archives.fedoraproject.org/pub/epel/6Server/x86_64/
-c,  --continue                 resume getting a partially-downloaded file. 断点续传
-nd, --no-directories           don't create directories. 不创建层级目录,所有文件下载到当前目录
-r,  --recursive                specify recursive download. 递归下载
-p,  --page-requisites          get all images, etc. needed to display HTML page. 下载页面所有文件,使页面能在本地打开
-k,  --convert-links            make links in downloaded HTML or CSS point to local files. 转换链接指向本地文件
-np, --no-parent                don't ascend to the parent directory. 不下载父级目录的文件
-o,  --output-file=FILE         log messages to FILE. 指定日志输出文件
-O,  --output-document=FILE     write documents to FILE. 指定文件下载位置
-L,  --relative                 follow relative links only. 只下载相对链接,如果页面嵌入其他站点不会被下载
posted @ 2017-07-03 00:01  KeithTt  阅读(5665)  评论(1编辑  收藏  举报