The apt-file program allows you to search the contents of all debian packages (installed and not installed) for files that you may need. For example, if you're compiling a program and need a header file but don't know which package provides the file, you can use apt-file to find out which package you should install to fix the problem:
# apt-get install apt-file # apt-file update # apt-file search foo.h
Be sure to run apt-file update periodically to update the file listing cache just as you also run apt-get update. The last command above will list any packages whose files match the specified search string, as well as the files that matched:
$ apt-file search bin/lsof lsof: usr/bin/lsof lsof: usr/sbin/lsof
aptapt-fileapt-getcommandsdebianlsofneatutilities