While reading through some old notes this weekend, I came across a page I created eons ago about managing Solaris packages. If you want to find out the file modes, the user and group ownership and the package a file belongs to, you can run the pkgchk utility with the “-l” and “-p” options and the name of a file to check:
$ pkgchk -l -p /usr/sfw/bin/snmpget
Pathname: /usr/sfw/bin/snmpget Type: regular file Expected mode: 0755 Expected owner: root Expected group: bin Expected file size (bytes): 20372 Expected sum(1) of contents: 48443 Expected last modification: Sep 20 17:41:36 2007 Referenced by the following packages: SUNWsmcmd Current status: installed
Pkgchk is a nifty utility!