1

I using solaris 10 and i have a pkg files how can i list out the its contents?

4 Answers 4

3

A list of the (to be installed) files can be displayed using the pkgchk command:

pkgchk -d package.pkg -l

If the pkg file has contains more than one package, you will be prompted. e.g.

The following packages are available:
  1  JetRedHat     JET RedHat support
                   (sparc) 4.4
  2  SUNWjet       Sun JumpStart Enterprise Toolkit
                   (sparc,i386) 4.7

Select package(s) you wish to process (or 'all' to process

The pkgtrans command can change the entire package from datastream to file system fomat if the -i option is not used. This can be helpful if you want to see the actions that occur after the package is installed onto a system. e.g:

less SUNWjet/install/postinstall
1

Unfortunately the Solaris package management system doesn't make this easy. You could try the following:

pkgtrans -i <pkgfile> spool

This will extract the pkginfo and pkgmap (list of files) files to /var/spool/pkg/package_name. You could review them there.

0

I get the package content through the command below:

$ strings <your-package-name> | grep ^"1 "
0

You can run for a spesific package which installed;

#pkgchk  -l <packagename>

Also before installing you can run and check package content.

pkgchk -d  expect-5.45-sol10-x86-local   -l 

And you can check for a spesific path.

pkgchk -lp /usr/local/bin/expect

Check this link for more details and command usage examples.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .