Ad esempio posso facilmente trovare il command locate appartiene al pacchetto mlocate.i386.
yum search locate mlocate.i386 : An utility for finding files by name [[email protected] /]$ rpm -qa | grep locate mlocate-0.15-1.el5.1 yum search updatedb Loaded plugins: fastestmirror, protectbase 0 packages excluded due to repository protections =========================================== Matched: updatedb =========================================== mlocate.i386 : An utility for finding files by name
Ma non è così facile trovare quale command a pacchetto appartiene:
yum search free // this command just returns too much informationy rpm -qa | grep free freetype-2.2.1-31.el5_8.1 // obviously not the package by which free command is installed
C'è quindi un modo convincente di sapere quale pacchetto appartenga ad un command specifico su Linux? Ad esempio CentOS o altre distribuzioni
Ricall il rpmdb.
rpm -qf $(which free)
Ubuntu / Debian:
dpkg -S $(which free)
Per CentOS, cosa succede a yum?
Uso
which free
per scoprire where è
Per me è a
/ Usr / bin / gratuito
Quindi puoi correre
yum provides /usr/bin/free
e ti dirà quale pacchetto ha