Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
add comment

3 Answers

up vote 3 down vote accepted

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
share|improve this answer
add comment

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.

share|improve this answer
add comment

I get the package content through the command below:

$ strings <your-package-name> | grep ^"1 "
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.