Package maintenance at the command line

Many users of Debian or its derivatives are aware of only a handful of tools. When troubleshooting or searching for a package to install, most rely on the Debian web pages for each package. The more expert may use apt-cache. However, these tools give limited information. For more demanding needs, a better alternative is Debian Goodies [1], a collection of small scripts that allow users to probe the details of packages without going through them file by file. First written and curated by Matt Zimmerman, Debian Goodies remain little known but can be equally useful for the casual user looking for a package, a sys admin troubleshooting packages, or a maintainer building a package. Perhaps their strongest feature is that, unlike the package web pages, Debian Goodies deliver results directly to the command line, without the need to switch windows.

dgrep and dglob

Searches can be useful for many purposes when you are troubleshooting packages. For instance, they can find what a package does, what the current package version is, or what programming language a package is written in. If all else fails, they can provide the name of the maintainer so that you can contact them. Both dgrep and dglob are in effect minor add-ons to already existing search tools, each of which deserves its own article. Here, there is only room for a general orientation.

By invoking the basic grep command, dgrep (Figure 1) searches for strings and regular expressions through installed packages. Similarly, degrep invokes egrep, dfgrep invokes fgrep, and dzgrep invokes zgrep. You can limit the search by specifying the packages to search within. The available options are the same as for grep, except for those specific to directories (-r, --recursive, -d recurse, --directories=recurse, -d read, --directories=read) because dgrep skips directories. In addition, symbolic links are not searched.

[...]

Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News