Datasheet

83
Chapter 4 Software Management
Depends: libc6 (>= 2.3.1-1)
Filename: pool/main/e/ed/ed_0.2-20_i386.deb
Size: 44718
MD5sum: 0c466ce6a160c62fa558fbbb46a4ea45
Description: The classic unix line editor
ed is a line-oriented text editor. It is used to
create, display, modify and otherwise manipulate text
files.
.
red is a restricted ed: it can only edit files in the
current directory and cannot execute shell commands.
user@hostname:~$
The information apt-cache displays is much the same as what aptitude pre-
sented, but it allows for easier scripting.
Searching with apt-cache
Finding packages to install can be a tough job, but there are a few good options.
Though
aptitude is by far the most flexible, allowing for all sorts of search queries
and narrowing-down of the results,
apt-cache is definitely the easiest to use, espe-
cially for short queries. For searching, try
apt-cache’s search option, as shown in
the following example. The format is
apt-cache search one or more search
terms
. This command will search the package names, short description, and pack-
age long descriptions and return a list of package names and short one-line descrip-
tions for packages that contain the search term or terms. If you get too many
results, try adding words to the search to narrow it down:
user@hostname:~$ apt-cache search debian goodies
debian-goodies - Small toolbox-style utilities for Debian systems
emacs-goodies-el - Miscellaneous add-ons for Emacs
python - An interactive high-level object-oriented language (default
version)
user@hostname:~$
When you find a package that looks interesting, you can use apt-cache show (as
explained in the previous subsection) to display the details about a listed package,
including its long description.
Searching with aptitude
aptitude has great browsing facilities and really flexible searching facilities.
However, the cool stuff is a bit complex, so I’ll discuss the simplest search method
in aptitude. Go ahead and run it so that you’re at the main screen. Type in a single
forward slash followed by a single term, and then press Enter. Pressing the forward
09_576445 ch04.qxd 7/5/05 3:10 PM Page 83