Re: Listing only the package names with dpkg?
On Tue, 3 Oct 2000, Preben Randhol wrote:
-|I'm trying to list out all the packages I have installed on my system.
-|I can do a dpkg -l, but I only want the package names not the rest, as
-|I'm going to use the package names.
-|
-|dpkg -l gives:
-|
-|ii xfonts-scalabl 3.3.6-2 scalable fonts for X
-|ii xfree86-common 3.3.6-10 X Window System (XFree86) infrastructure
-|
-|I would like to have:
-|
-|xfonts-scalable_3.3.6-2
-|xfree86-common_3.3.6-10
-|etc...
-|
-|I've been looking through the man page, but I cannot find out how to
-|achieve this.
-|
I'm new to Debian (not to Linux/UNIX) but you could pipe the
results through "cut". For example:
dpkg -l | cut -c 5-30 > my_log_file
This will output only columns 5-30 of the output.
---
Christopher W. Aiken, Scenery Hill, Pa, USA
chris at cwaiken dot com, www.cwaiken.com
Current O/S: Debian 2.2 GNU/Linux
Reply to: