yum小技巧

  1. 有時候我們只知道命令卻不知道產生這個命令安裝包,怎麼辦?

使用選項provides去發現命令的安裝包

# yum --help | grep provides
provides       Find what package provides the given value(找到包提供的給定值)


用法舉例:查找scp命令的安裝包

# yum provides */scp    
Loaded plugins: downloadonly, fastestmirror
Loading mirror speeds from cached hostfile
openssh-clients-5.3p1-94.el6.x86_64 : An open source SSH client applications
Repo        : a
Matched from:
Filename    : /usr/bin/scp




2. 有時候我們需要下載yum庫裏面的包,怎麼辦?

使用yumdownloader

# yum install yum-utils 
# yumdownloader gcc-c++  --destdir=/tmp/gcc  
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
gcc-c++-4.4.7-4.el6.x86_64.rpm     

# ls /tmp/gcc/
gcc-c++-4.4.7-4.el6.x86_64.rpm







發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章