06 July 2005

Whodunit? Finding what package a file belongs to

Those of you who are refugees from the RedHat Linux world, may be used to a rather simple way of finding out what package claims responsibility for a particular file. Well, you'll be relieved to know it's just as easy to find out under Solaris as it is when running RPM based Linux distributions. Here's a simple example of how I found out what package references /usr/bin/nautilus:

/usr/sbin/pkgchk -l -p /usr/bin/nautilus

Here is the resulting output:

Pathname: /usr/bin/nautilus
Type: regular file
Expected mode: 0755
Expected owner: root
Expected group: other
Expected file size (bytes): 677516
Expected sum(1) of contents: 25862
Expected last modification: Dec 16 11:52:16 2004
Referenced by the following packages:
SUNWgnome-file-mgr
Current status: installed

Technorati Tags:

1 comment:

stevel said...

http://whacked.net/2005/08/02/pkgxtra/

a stupid little shortcut shell script to do this, and a couple other silly little things.