Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
Managing HP-UX Software With SD-UX: HP 9000 Computers > Chapter 5 Listing Software

Advanced Topics for swlist

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

You can control the appearance and content of your lists by changing list default values in the defaults file /var/adm/sw/defaults or $HOME/.sw/defaults. Values in this file are specified using the command.option=value syntax. You can also change option values from the command line via the -x option=value option.

List Defaults

Instead of repeatedly specifying the software levels and attributes on the command line each time you invoke swlist, you may use two special defaults: level= and one_liner=.

Title not available (List Defaults )

level=

This default pre-determines what level to list: product, subproduct, fileset or file. For example, by setting this default to level=fileset, future swlist commands would always list everything down to, and including, filesets for each host, depot or product selected.

one_liner="attribute attribute attribute"

Specifies the attributes (revision, size, title, etc.) the default listing should present. These attributes are separated by <tab> or <space> and enclosed in quotes (" "). Several attributes may be chosen but a particular attribute may not exist for all applicable software levels (product/subproduct/fileset). For example, the software attribute title is available for bundles, products, subproducts and filesets, but the attribute architecture is only available for products.

In the absence of the -v or -a option in your command, swlist will always display the information as described in the one_liner= default for each software object level (bundle, products, subproducts and filesets), not for files.

Creating Custom Lists

The swlist options and defaults allow you to create lists to fit your specific requirements. These lists can be as simple as listing the software products installed on your local host or as complex as a multiple column listing of files, filesets, subproducts, products and bundles installed.

For example, if you were to change the one-liner= option on the command line, the command:

swlist -x one_liner="name revision size title"

produces this list of all the products installed on the local host:

RX              1.98    9845     RX X Terminal - all software
ALLBASE 8.00.1 6745 Database Products
C-LANG 2.5 5678 Programming Language
DIAGNOSTICS 2.00 56870 Hardware Diagnostic Programs
DTP68 2.00 26775 Desktop Publishing
LISP-LANG 8.00.1 90786 LISP Programming Language
WINDOWS 2.06 10423 Windowing Products

This listing shows, in columns from left to right, the product's tag, its revision number, its size in Kbytes and its title or full name.

NOTE: Whatever you specify in the command line for software level and attributes will override the values in the default option files.

You can also change the one_liner= default value to {revision size title} in the defaults file. Then a listing of the C-LANG products on host2 would be:

swlist C-LANG @ host2
C-LANG.C-COMPILE     8.0    1346       C Compiler Components
C-LANG.C-LIBS 8.0 2356 Runtime Libraries
C-LANG.C-MAN 8.0 1976 Programming Reference

More swlist Examples

In the following examples, swlist requests are sent to the standard output. All examples assume the one_liner= default is "revision size title" and the level= default is "product."

  • List the contents of the local tape depot, /dev/rmt/0m:

    swlist -d @ /dev/rmt/0m
    or
    swlist -s /dev/rmt/0m
    AUDIT       3.5     9834      Trusted Systems Auditing Utils
    COMMANDS 1.7 4509 Core Command Set
    C-LANG 2.5 5678 C Programming Language
    NETWORKING 2.1 9072 Network Software
    KERNEL 1.4 56908 Kernel Libraries and Headers
    VUE 1.3 5489 Vue (Instant Ignition Release)
    WINDOWS 2.06 10423 Windowing Products
  • List all the media attributes of the local tape depot, /dev/rmt/0m:

    swlist -v -l depot @ /dev/rmt/0m
    or
    swlist -vl depot -s dev/rmt/0m
     type           distribution
    tag CORE OS
    description HP-UX Core Operating System Software Disk
    number B2358-13601
    mod_date June 1998
  • List the README file for product, OS_CORE installed on the local host:

    swlist -a readme OS_CORE
    readme:
    ****************
    * Introduction *
    ****************

    The Release Notes for HP-UX Release X.0 contain an overview of the
    new/changed product features that are included in the release. For
    detailed information about these features, refer to the appropriate
    product manuals. This document does not contain information about
    software changes made as a result of a Service Request; that
    information may be found in the Software Release Bulletin (SRB) for
    Release X.0.

    ********************
    * Hardware Support *
    ********************

    The HP 9000 Model XXX is no longer supported.
    .
    .
    .
  • List the products stored in the software depot on host1 located at /swmedia. For this example assume the swlist one_liner is: "title size architecture":

    swlist -d @ host1:/swmedia
    FRAME		       Frame Documentation Pkg     2319   HP-UX_9000_Series_AorB
    FRAME Frame Documentation Pkg 2458 OSF1_9000_Series_1.0
    ME30 3-D Mechanical Eng 5698 HP-UX_9000_Series300_AorB
    SOFTBENCH Softbench Development Env 4578 HP-UX_9000_Series300
    TEAMWORK Teamwork Design/Analysis 3478 HP-UX_9000_Series300/400

    Note that the media contains two revisions of the FRAME product.

Listing Patches

You can use swlist to list software patches and their status. See “Listing Patches” for more information.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1997 Hewlett-Packard Development Company, L.P.