利用wget批量下載http目錄下所有rpm文件。制作yum本地源。


# openstack-stein源下載

kdir openstack-stein
cd openstack-stein/
wget -nd -r -l1 -A.rpm --no-parent https://mirrors.aliyun.com/centos/7/cloud/x86_64/openstack-stein/ -e robots=off

 

# ceph-luminous

mkdir ceph-luminous
cd ceph-luminous/
wget -nd -r -l1 -A.rpm --no-parent http://mirrors.aliyun.com/ceph/rpm-luminous/el7/x86_64/ -e robots=off

wget -nd -r -l1 -A.rpm --no-parent http://mirrors.aliyun.com/centos/7/os/x86_64/Packages/ -e robots=off

wget -nd -r -l1 -A.rpm --no-parent http://mirrors.163.com/centos/7/os/x86_64/Packages/ -e robots=off

wget -nd -r -nc -p -A.rpm --no-parent http://mirrors.aliyun.com/epel/7/x86_64/Packages/ -e robots=offcd

 


-nd 不創建目錄,wget默認會創建一個目錄
-r 遞歸下載
-l1 (L one) 遞歸一層,只下載指定文件夾中的內容,不下載下一級目錄中的。
–no-parent 不下載父目錄中的文件

-p 下載網頁所需的所有文件,如圖片等

-nc:下載時跳過已經存在的文件

-e robots=off 忽略robots

----------------------------------------------------------------------------------------------------------------------

 

原文:http://poweroff.cn/linux-system/336.html


免責聲明!

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



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