debian/ubuntu: finding which package contains a file

Translation of the original in Catalan. Read it in: CatalàCastellano

Quick reference to find out which package on a debian/ubuntu contains a file. The typical functionality you never remember when you need it:

Installed packages:

dpkg --search /path/fitxer

Files of packages that are not installed:

# cal la utilitat apt-file
apt-get install apt-file
apt-file update
apt-file search fitxer

2 comments

Comments from the old blog, as they were written. Comments are closed.

  1. Oriol Rius

    equivalències entre apt-get i rpm:

    http://www.linux-party.com/modules.php?name=News&file=article&sid=5460:similitudes-y-diferencias-entre-rpm-y-dpkg-yum-y-apt-get

  2. Oriol Rius

    Aquesta mateixa funcionalitat en Fedora (yum) es resoldria així:

    sudo yum whatprovides '*bin/grep'