1Z0-822 · Question #24
While examining an Oracle Solaris 11 system, you discover an unfamiliar ELF binary in the /usr/bin directory. You want to know which package installed the binary. Which pkg subcommand should you use…
The correct answer is C. pkg search. pkg search is the correct tool because it queries the package database by file path, allowing you to find which package owns a specific file - for example, pkg search /usr/bin/somebinary returns the package that delivered that file. Why the distractors are wrong: A. pkg info…
Question
While examining an Oracle Solaris 11 system, you discover an unfamiliar ELF binary in the /usr/bin directory. You want to know which package installed the binary. Which pkg subcommand should you use to identify the package, based on the absolute path to the binary?
Options
- Apkg info
- Bpkg list
- Cpkg search
- Dpkg contents
How the community answered
(33 responses)- A3% (1)
- B6% (2)
- C88% (29)
- D3% (1)
Explanation
pkg search is the correct tool because it queries the package database by file path, allowing you to find which package owns a specific file - for example, pkg search /usr/bin/somebinary returns the package that delivered that file.
Why the distractors are wrong:
- A.
pkg infoshows metadata about a known package (version, description, publisher) - it requires you to already know the package name. - B.
pkg listdisplays installed packages matching a name pattern - again, you'd need to know the package name first. - D.
pkg contentslists the files within a known package - the reverse of what you need here.
Memory tip: Think of it as a reverse lookup - you have the file, you need the package. search is the only subcommand that works from a file path outward to a package name, just like searching a phone book by address to find the owner's name.
Topics
Community Discussion
No community discussion yet for this question.