由于网络问题,OpenStack官方文档时常不能正常访问或者加载速度非常慢,于是就想办法把文档下载到本地,这样查看更加便捷。
URL=http://docs.openstack.org
NAMES=admin-guide arch-design networking-guide security-guide ops-guide image-guide ha-guide
VERSION=liberty
for NAME in ${NAMES[@]}
do
wget -r -p -np -k $URL/$NAME/
done
wget -r -p -np -k $URL/$VERSION/networking-guide/
常用选项
-r --recursive specify recursive download.
-k --convert-links make links in downloaded HTML point to local files.
-p --page-requisites get all images, etc. needed to display HTML page.
-np --no-parent don't ascend to the parent directory.
-nc 外断点续传
-o 日志