Wednesday, August 21, 2013


YUM (Yellow Updater,Modified) and rpm  (Red Hat Package Manager) are used as package managment tool. These are frequently 
used for management but comprise of less frequently  used options as follows which save the time of system administrator to 
retrieve system related information :

=> rpm can be used to find all the packages which are installed outside CentOS repositories , that is , third party repositiories as 

[root@PC1 ~]# rpm -qa --qf '%{NAME} %{VENDOR}\n' | grep -v CentOS
The sample output is:
flash-plugin Adobe Systems Inc.
crash-trace-command Fujitsu Limited
adobe-release-x86_64 Adobe Systems Inc.
gpg-pubkey (none)
gpg-pubkey (none)

=> We can quickly view the documentation related to a package using either of the two commands as below:
rpm -qd <packagename>
rpm -qdf /path/to/file
The    first command gives the documentation present in  the rpm  while second option gives the documentation in the package 
which owns the file.For example:
 [root@PC1 ~]# rpm -qd pinentry-0.7.6-6.el6.x86_64

=> The       following command is used to list the file stored inside the rpm file
# rpm -qpl file.rpm
For        example,
  [root@PC1 ~]# rpm -qpl Downloads/adobe-release-x86_64-1.0-1.noarch.rpm 
=> We can also list the files in the installed package using following command:
# rpm -ql packageName
For example,
 [root@PC1 ~]#rpm -ql httpd


Post a Comment