Solaris find out a package which a file belongs to

Q. How do I find out a package which a file belongs to…? I am using Solaris UNIX ver 10.0

A. Use pkgchk command which check package installation accuracy under Solaris UNIX.

pkgchk checks the accuracy of installed files or, by using the -l option, displays information about package files. pkgchk checks the integrity of directory structures and files. Discrepancies are written to standard error along with a detailed explanation of the problem.

You can find out a package which a file belongs to with following command:
pkgchk -l -p /path/to/file
pkgchk -l -p /usr/bin/ls

Where,

  • -l: List information on the selected files that make up a package
  • -p path: Only check the accuracy of the path name or path names listed. path can be one or more path names separated by commas (or by white space, if the list is quoted).

Above command displays package installation information for /usr/bin/ls command. Following command displays package installation information for sendmail:
# pkgchk -l -p /usr/lib/sendmail

🐧 If you liked this page, please support my work on Patreon or with a donation.
🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
1 comment… add one
  • Toxic Jul 21, 2009 @ 7:59

    Thank You.

Leave a Reply

Your email address will not be published. Required fields are marked *

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.