Sometimes we need to kown which package a command belongs to, and also what the other commands that package contains, here are the steps:
1. locate the absolute path of the command
[root@beta-host ~]# whereis ifconfig
ifconfig: /sbin/ifconfig /usr/share/man/man8/ifconfig.8.gz
2. find out the package
[root@beta-host ~]# rpm -qf /sbin/ifconfig
net-tools-1.60-78.el5
3. contents of the package
[root@beta-host ~]# rpm -ql net-tools-1.60-78.el5
/bin/dnsdomainname
/bin/domainname
/bin/hostname
/bin/netstat
/bin/nisdomainname
/bin/ypdomainname
/etc/netplug
/etc/netplug.d
/etc/netplug.d/netplug
/etc/netplug/netplugd.conf
/etc/rc.d/init.d/netplugd
/sbin/arp
/sbin/ether-wake
/sbin/ifconfig
/sbin/ipmaddr
/sbin/iptunnel
/sbin/mii-diag
…………
阅读(647) | 评论(0) | 转发(0) |