Solaris pkg equivalent to rpm -q --whatprovides
By bnitz on Feb 22, 2006
The Rosetta stone for unix isn't quite up to date with Solaris 10+/OpenSolaris and its linux entries could be expanded to include other linux distributions and versions. But it is a good overview of some differences a sysadmin would encounter when migrating between various flavors of unix.
Since linux and Solaris have several package formats to keep track of, I occasionally forget the syntax of installing and querying various package databases. For example, the Solaris SVR4 package equivalent to:
-bash-2.05b# rpm -q --whatprovides /bin/ls coreutils-4.5.3-26is this:
bash-3.00$ grep "/usr/bin/ls" /var/sadm/install/contents /usr/bin/ls f none 0555 root bin 23480 47244 1131589504 SUNWcsuI occasionally forget this so I figured that I should write it down here in case anyone else is looking for it. Update:
Thanks Jason for the comment. I agree that in most circumstances it would be better to use the pkgchk command:
pkgchk -l -p /usr/bin/ls