I'm looking for a package that provides a specific binary, so I can install it. how can I search to find out what packages provide this binary? (note: I know there's at least one tool that does this, but I have forgotten its name.)
Since pacman 5.0, there is built-in functionality for searching the database with the
-F option. First update the database:
sudo pacman -Fy
Then you can see which package contains
pacman -F $filename
if you are searching for an exact file name or full path, or
pacman -Fx $expr
$expr interpreted as a regular expression.
Since you knew you were looking for an equivalent of
apt-file, you could have looked it up in the Pacman Rosetta.
Alternatively, you can use pkgfile. Install it with
pacman -S pkgfile, then run
sudo pkgfile -u
to update the database. To see what package contains