List of files aaociated with pacakage

What is the command to find the list of files associated with package on Solaris ?

I think there's an easier way but it's late and I'm really tired so check the pkgmap file. Here's an example

/var/sadm/pkg/SUNWbash/save/pspool/SUNWbash/pkgmap

you can use
pkgchk -l -p /path/to/filename
to see what package a file is associated with.

edit:
oh yeah, use grep to check /var/sadm/install/contents

just u check with
#pkginfo -l
all pkgs are stored in
#cat /var/sadm/pkg
#cat /var/sadm/install/contents

spool pkgs are in #cat /var/spool/pkgs

just u check it out.

# grep package /var/sadm/install/contents

pkgchk -l -p <pkg_name> is your best bet!

-p is used for the pathname , not package name.

     -p path         Check the accuracy only of the path name  or
                     path  names  listed. path can be one or more
                     path names separated by commas (or  by  whi-
                     tespace, if the list is quoted).

The correct use of pkgchk to get what you want is: pkgchk -l <pkg_name> | grep Pathname

ie:

# pkgchk -l SUNWaudd | grep Pathname
Pathname: /kernel
Pathname: /kernel/drv
Pathname: /kernel/drv/audio1575.conf
Pathname: /kernel/drv/audiocs.conf
Pathname: /kernel/drv/audioens.conf
Pathname: /kernel/drv/audiots.conf
Pathname: /kernel/drv/sparcv9
Pathname: /kernel/drv/sparcv9/audio1575
Pathname: /kernel/drv/sparcv9/audiocs
Pathname: /kernel/drv/sparcv9/audioens
Pathname: /kernel/drv/sparcv9/audiots
Pathname: /kernel/drv/sparcv9/dbri
Pathname: /kernel/misc
Pathname: /kernel/misc/sparcv9
Pathname: /kernel/misc/sparcv9/amsrc1
Pathname: /kernel/misc/sparcv9/amsrc2
Pathname: /kernel/misc/sparcv9/audiosup
Pathname: /kernel/misc/sparcv9/diaudio
Pathname: /kernel/misc/sparcv9/mixer
#
1 Like