6.4.1 Information on a file
To find the package to which a particular filename pattern belongs in the
installed packages:
$ dpkg {-S|--search} pattern
Or to find the similar in the Debian archive:
$ wget https://ftp.us.debian.org/debian/dists/sarge/Contents-i386.gz
$ zgrep -e pattern Contents-i386.gz
Or use specialized package commands:
# aptitude install dlocate
# conflicts with slocate (secure version of locate)
$ dlocate filename # fast alternative to dpkg -L and dpkg -S
...
# aptitude install auto-apt # on-demand package installation tool
# auto-apt update # create db file for auto-apt
$ auto-apt search pattern
# search for pattern in all packages, installed or not