swlist is a HP utility from the HP OpenView Software Distributor to display information about software products.
There is a caveat: because of our distributing a common environment through NFS (and ClearCase), this has to be run in sirion (HPUX11) or mahtan (HPUX10), or even in sinkku (old environment). The results of running it in any other host will be inaccurate.
What "product" do files in the /usr/ccs directory belong to, and what is its current version?
A first command might get a list mentioning the products
/usr/sbin/swlist -l file | grep /usr/ccs | cut -d : -f 1 | sort | uniq
A next request using them:
/usr/sbin/swlist -l product OS-Core PHCO_14612 PHSS_15380 ProgSupport
will return version numbers.
A final request using "version component" to select products or patches. The version component supports some regular expressions and operators ==, <=, >=, <, >, or !=. For example.
/usr/sbin/swlist -l product \*,r=1.[01]
/usr/sbin/swlist -l product \*,r\>=B.10.20
More info, e.g. on attributes such as os_release, can be found from sd(4).