Tuesday, January 26, 2016

Listing more information on an rpm file

1. List the RPM to which a file belongs
# rpm -qa |grep  gcc
gcc-4.4.7-16.el6.x86_64
gcc-gnat-4.4.7-16.el6.x86_64
gcc-objc++-4.4.7-16.el6.x86_64
libgcc-4.4.7-16.el6.x86_64
gcc-c++-4.4.7-16.el6.x86_64
gcc-gfortran-4.4.7-16.el6.x86_64
gcc-java-4.4.7-16.el6.x86_64
gcc-objc-4.4.7-16.el6.x86_64

2. List all files from an installed package:
# rpm -qpl rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
/etc/apt
/etc/apt/sources.list.d
/etc/apt/sources.list.d/rpmforge-extras.list
/etc/apt/sources.list.d/rpmforge-testing.list
/etc/apt/sources.list.d/rpmforge.list
/etc/pki/rpm-gpg
/etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
/etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-fabian
/etc/smart
/etc/smart/channels
.....
.....

 List of dependent RPMs for a specific RPM package
# rpm -qaR htop
libc.so.6()(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libc.so.6(GLIBC_2.3)(64bit)
libc.so.6(GLIBC_2.3.4)(64bit)
libc.so.6(GLIBC_2.4)(64bit)
libm.so.6()(64bit)
libm.so.6(GLIBC_2.2.5)(64bit)
libncursesw.so.5()(64bit)
libtinfo.so.5()(64bit)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rtld(GNU_HASH)
rpmlib(PayloadIsXz) <= 5.2-1

No comments: