Shawn Walker wrote:
[email protected] wrote:
On Mon, Aug 31, 2009 at 11:42:46PM +0100, Peter Tribble wrote:
A very common operation: is package foo installed? And in which version
on 2000 boxes?
A quick suggestion:
If you know the name of the package and want to know if it's installed,
use the pkg list operation:
$ pkg list SUNWjruby pkg: no packages matching 'SUNWjruby' installed
$ pkg list SUNWvim
NAME (PUBLISHER) VERSION
STATE UFIX
SUNWvim 7.2.141-0.121
installed ----
Of course, if you don't know the name of the package, this approach
doesn't help.
And I might add, pkg list allows multiple packages to be specified and
with the new catalog work going in soon will be faster than grepping
through contents ...
As an example:
$ time pkg -R /mnt list SUNWipkg*
NAME (PUBLISHER) VERSION STATE
UFIX
SUNWipkg 0.5.11-0.117 installed
u---
SUNWipkg-brand 0.5.11-0.117 installed
u---
SUNWipkg-gui 0.5.11-0.117 installed
u---
SUNWipkg-gui-l10n 0.5.11-0.117 installed
u---
SUNWipkg-um 0.5.11-0.117 installed
u---
real 0m0.261s
user 0m0.152s
sys 0m0.100s
Cheers,
--
Shawn Walker
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss