Ubuntu Package Management

find files installed by a package

$ dpkg -L python-mysqldb | head
/.
/usr
/usr/lib
/usr/lib/pyshared
/usr/lib/pyshared/python2.6
/usr/lib/pyshared/python2.6/_mysql.so
/usr/share
/usr/share/doc
/usr/share/doc/python-mysqldb
/usr/share/doc/python-mysqldb/HISTORY

find which package provided a command

$ dpkg -S `which exiv2`

query package info

$ apt-cache show sendmail    # while package is not installed
$ dpkg --status sendmail     # while a package have already installed