devork

E pur si muove

Solaris equivalent of dpkg -S

Tuesday, August 19, 2008

In the past I have spent quite some time trying to figure out what package did install a certain file on Solaris. What I wanted was really just the equivalent of dpkg -S /path/to/file. But those searches where not very fruitfull, even talking to more experienced Solaris admins didn't help, they could only tell me how to find out what files where in a certain package.

Today however, mostly by accident (I was trying to remember how to list the files in a package), I finally found it!

neptune:~# pkgchk -l -p /usr/local/bin/wget 
Pathname: /usr/local/bin/wget
Type: regular file
Expected mode: 0755
Expected owner: bin
Expected group: bin
Expected file size (bytes): 392572
Expected sum(1) of contents: 32029
Expected last modification: Nov 25 10:57:55 2006
Referenced by the following packages:
        SMCwget        
Current status: installed

neptune:~# 

Wonderful

Subscribe to: Posts (Atom)