Package Info#
How to tell if the package is installed:pkginfo |grep VRTSobgui
Get version info from an installed package#
Solaris#
pkgparam NOVLsubag VERSION 8.7.3.3
Linux#
rpm -qi NOVLsubag 2>/dev/null | grep "Version" | awk '{print $3}' 8.7.3.3
Or, by querying for only the desired details:
rpm -q --qf %{VERSION} NOVLsubag 8.7.3.3
Get version info from a package file#
Solaris#
pkgparam -d NDSserv.pkg NDSserv VERSION 8.7.3.2
Linux#
rpm -qp --qf %{VERSION} NDSserv-8.7.3.2-35.i386.rpm 8.7.3.2
Find out a package which a file belongs to#
Solaris#
% pkgchk -l -p /usr/lib/sendmail Pathname: /usr/lib/sendmail Type: regular file Expected mode: 4555 Expected owner: root Expected group: bin Expected file size (bytes): 650720 Expected sum(1) of contents: 22626 Expected last modification: Apr 07 04:13:53 1999 Referenced by the following packages: SUNWsndmu Current status: installed %*Plagarized from a Solaris Command Reference

Linux#
rpm -qf /usr/sbin/sendmail sendmail-8.12.11-4.RHEL3.1