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. 只下載相對鏈接,如果頁面嵌入其他站點不會被下載


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM