HP-UX Reference (11i v1 05/09) - 1M System Administration Commands N-Z (vol 4)
s
swlist(1M) swlist(1M)
(HP-UX Software Distributor)
• Depot Listing
• Multiple Targets Listing
• Verbose Listing
Default Listing
If swlist is invoked with no software_selections and no target_selections, a listing of all installed pro-
ducts on the local host is produced. This listing contains one line for each product. The line includes the
product tag attributes and all other attributes selected via the
one_liner option.
If target_selections (i.e. target hosts) are specified, this same format listing is produced for the installed
software at each of the specified hosts.
Software Listing
A listing of software objects is controlled by the specified software_selections, and also by the
-l option (
swlist.level=
). swlist lists the contents of each software object specified in the
software_selections. For example, if you specify product selections, the subproducts and/or filesets con-
tained immediately below each product will be listed. If you specify fileset selections, the files contained in
each fileset will be listed.
The depth of objects listed is controlled with the
-l option. This option can expand or restrict the depth in
concert with the specified software selections. By default, the contents of a specified software selection are
always listed (as described above). The -l option can defeat this listing by specifying a level equivalent to
the level of objects in the software_selections. For example, if you want to list specific product selections
but not their contents, use
-l product. If you want to list specific fileset selections but not their con-
tained files, use -l fileset. The software_selection options only apply if the level is bundle, product,
subproduct, fileset, file, or patch.
Depot Listing
Another class of objects that
swlist can display are software depots. For example, the user can list all
registered depots on a given host. A combination of the -l depot option and target_selections operands
can produce a variety of depot listings.
Multiple Targets Listing
Multiple target_selections (i.e. root filesystems, alternate roots, or depots) are listed sequentially: list all
the requested objects and attributes from the first target_selection, followed by the second target_selection,
etc.
Ver bose Listing
The
-v option causes a verbose listing to be generated. A verbose listing includes all attributes defined for
an object. The swlist command prints the keyword and value for each attribute. The attributes are
listed one per line. The user can post-process (filter) the output with grep(1), awk(1), and/or sed(1) to get
the fields of interest.
The depot’s attributes are displayed if
swlist is called with the -v and -l depot options, and a
specific depot target_selection.
Attributes for a particular software level (
product/subproduct/fileset/file
) are displayed
based on the depth of the specified software_selections. For example, swlist -v product1.fileset1 will give all
fileset attributes for fileset1. If the
-v option is used with the -l option, the different listing are:
• To display attributes for all products, use swlist -v -l product
• To display attributes for all products and subproducts, use swlist -v -l subproduct
• To display attributes for all products and filesets, use swlist -v -l fileset
• To display attributes for all products, filesets, and files, use
swlist -v -l file
RETURN VALUE
The swlist command returns:
0 The software_selections and/or target_selections were successfully listed.
1 The list operation failed on all target_selections.
2 The list operation failed on some target_selections.
HP-UX 11i Version 1: September 2005 − 9 − Hewlett-Packard Company Section 1M−−953