Datasheet

80
Part I The Fundamentals
dpkg can also display which files are part of a given package and search for which
package owns a particular file. These actions are done using the
-L and -S options,
respectively. The following example illustrates the use of these options:
user@hostname:~$ dpkg –L base-passwd
/.
/usr
/usr/sbin
/usr/sbin/update-passwd
/usr/share
/usr/share/doc
/usr/share/doc/base-passwd
/usr/share/doc/base-passwd/README
/usr/share/doc/base-passwd/copyright
/usr/share/doc/base-passwd/changelog.gz
/usr/share/man
/usr/share/man/man8
/usr/share/man/man8/update-passwd.8.gz
/usr/share/base-passwd
/usr/share/base-passwd/group.master
/usr/share/base-passwd/passwd.master
user@hostname:~$ dpkg –S /usr/share/base-passwd
base-passwd: /usr/share/base-passwd
user@hostname:~$
dpkg -S and dpkg -L function only for packages that you have installed. See the
subsection “Searching using the Debian package Web site” for information on how
to look at packages in this manner when you don’t have them installed.
Using aptitude to list packages
As mentioned previously, one of aptitude’s great strengths is its ability to flexibly
display information about your package database. The following instructions walk
you step-by-step through an example description of using
aptitude:
1. Open
aptitude with this command:
user@hostname:~$ aptitude
Your screen should look similar to the one shown in Figure 4-1.
As you can see,
aptitudes main display is nicely organized.
2. By default, the bottom half of the screen is used to display the long descrip-
tions of packages. Toggle that off by pressing Shift+D, giving you more real
estate to work with in the top half.
Cross-
Reference
09_576445 ch04.qxd 7/5/05 3:10 PM Page 80