[Home]Tips/Solaris Notes

Scalene Wiki | Tips | Recent Changes |

Misc. Solaris Notes

Kernel Parameters


Determining which package a file belongs to

Use the pkgchk command to determine which package a particular file belongs to. The syntax is:

 # /usr/sbin/pkgchk -l -p /absolute/path/todir

For example,

 # /usr/sbin/pkgchk -l -p /usr/bin/pgrep
 Pathname: /usr/bin/pgrep
 Type: regular file
 Expected mode: 0555
 Expected owner: root
 Expected group: bin
 Expected file size (bytes): 14688
 Expected sum(1) of contents: 63968
 Expected last modification: Mar 16 05:53:45 AM 2000
 Referenced by the following packages:
         SUNWcsu
 Current status: installed

You can also simply query the packages directory as follows:

 # grep /usr/bin/pgrep /var/sadm/install/contents
 /usr/bin/pgrep f none 0555 root bin 14688 63968 953204025 SUNWcsu

Scalene Wiki | Tips | Recent Changes |
This page is read-only | View other revisions
Last edited August 12, 2006 20:46 by Jason (diff)
Search: