LINUX - dpkg - What Package does a file belong to?

WHAT PACKAGE DOES A FILE BELONG TO?
=====================================

FIRST FIND OUT THE FULL PATH TO THE PROGRAM:
which [PROGRAM NAME]

WHAT PACKAGE DOES A FILE BELONG TO?
dpkg -S [FULL FILENAME AND PATH TO PROGRAM]

WHAT OTHER PROGRAMS ARE FROM THIS PACKAGE?
dpkg -L [NAME OF PACKAGE]

EXAMPLE:
--------

# which fold
/usr/bin/fold

# dpkg -S /usr/bin/fold
coreutils: /usr/bin/fold

# dpkg -L coreutils
/.
/bin
/bin/cat
/bin/chgrp
/bin/chmod
/bin/chown
/bin/cp
/bin/date
...snip...
/usr/bin/fold
...snip...
SelectionFile type iconFile nameDescriptionSizeRevisionTimeUser
Comments