/usr/bin/. I first thought that the way to go was to use apt-file for doing so, running
apt-file showon each package found in the repository. Bad idea: it takes, say, 10 seconds to run
apt-file showon my machine. Mutliply that by around 600 binary packages, it takes some time.
So, I wrote a script based on the same idea (using
Contents files, see
apt-file(1)) that does the both the lookup of all binary packages produced by source trees present in the current directory and looking up a pattern in the
Contents file. You can download it here. Typical uses:
- find all binary packages generated from source tree in the current directory:
- find all of them that install a file in
find-packages usr/bin ~/.apt-file/ftp.fr.debian.org_debian_dists_unstable_Contents-amd64.gzThe file
~/.apt-file/ftp.fr.debian.org_..._Contents-amd64.gzor a similar one can be found in
Meanwhile, out of nearly 600 packages, there are only 61 binaries out of 35 packages. Java packages are mostly libraries, then.