Revision as of 13:15, 18 July 2012 by Jstjohn (add DISPLAYTITLE; minor rewording; added partial example 2. I will finish example 2 once my Linux box is back on)
pkgfile is a tool that tells you which package owns a specified file or which files a given package provides.
After installing the package, you should update the file list database as root:
# pkgfile --update
$ pkgfile makepkg # Search for a package that contains a file named 'makepkg'. core/pacman # Your searched file is in the 'pacman' package in the [core] repository.
$ pkgfile core/pacman # List all files provided by the 'pacman' package in the [core] repository.