dpkg wildcards


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users dpkg wildcards
# 1  
Old 09-07-2010
dpkg wildcards

Are there different rules with wildcards in dpkg? I was looking at this.
Getting information about packages
Code:
%  dpkg -l \*apt\* 
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name              Version           Description
+++-=================-=================-=============================================================
ii  apt               0.3.19            Advanced front-end for dpkg
ii  apt-move          3.0-13            Move cache of Debian packages into a mirror hierarchy
ii  aptitude          0.0.4a-4.1        Console based apt frontend
un  libapt-pkg-dev    <none>            (no description available)
un  libapt-pkg-doc    <none>            (no description available)
un  libapt-pkg2.7     <none>            (no description available)
pn  task-laptop       <none>            (no description available)

I thought with the it used this command that it would treat the "*" as a literal "*" and not a wildcard. I thought the "\" takes away special meanings. Could anyone explain why this is happening? I put that command in terminal with and without the "\" and I got the same thing both times. I would think with the way it is put that it would look for "*apt*".
Code:
dpkg -l \*apt\*

# 2  
Old 09-07-2010
You can use
Code:
dpkg -l *apt*

which will work except when there happen to be files with the pattern *apt* in your current directory, after which the shell will replace the pattern with file names which is not what you want. If they are not there the pattern is passed unchanged.

In order to not leave things to chance it is better to use
Code:
dpkg -l \*apt\*

or
Code:
dpkg -l '*apt*'

Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Dpkg command not found

Hi All, I tried to install Message Broker toolkit in Linux server. When I tried to run mqsicreatebar, I received below error -bash-3.2$ -bash-3.2$ pwd /opt/IBM/WMBT800 -bash-3.2$ ./mqsicreatebar ./mqsicreatebar: error while loading shared libraries: libgtk-x11-2.0.so.0: wrong ELF class:... (1 Reply)
Discussion started by: Anusha M
1 Replies

2. Shell Programming and Scripting

Mobile media got new name after dpkg --configure -a

I need some explanation, afer executing this command in the terminal dpkg --configure -abecause synaptic told me it does not work properly and told me to do so, otherwise it would not even start. My mobile media like usb-drive or stick is named like below, 641ea5c8-47d2-4473-ae01-6499d2f7ccba!... (0 Replies)
Discussion started by: 1in10
0 Replies

3. Shell Programming and Scripting

Dpkg Syntax Issue . . .

Greetings! I'm trying to get dpkg to just completely extract a multi-part *.deb archive set into a single folder called "output". Simple? Hmmmm.... dpkg --noforce --unpack *.deb /output/Console after ops: However, "--noforce" is taken directly from the helpfile Options listing as furnished... (8 Replies)
Discussion started by: LinQ
8 Replies

4. Shell Programming and Scripting

> dpkg-deb to Extract and Reconstruct a Multipart Archive???

Greetings! Here's one which has been bugging me for a bit ;) As might be known, LibreOffice is available to some of us Linux folk as a large set of debs. Of course, being a curious sort, I'd like to dig in and recreate the original tree which is composed of these assorted archives. So, I... (1 Reply)
Discussion started by: LinQ
1 Replies

5. Ubuntu

Dpkg architecture

I noticed dpkg reporting architecture as AMD64, but the h/w is Intel, see below: ~$ uname -a Linux XXX 3.2.0-29-generic #46-Ubuntu SMP Fri Jul 27 17:03:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux ~$ lshw | grep -i xeon WARNING: you should run this program as super-user. PCI (sysfs) ... (2 Replies)
Discussion started by: migurus
2 Replies

6. Ubuntu

dpkg: warning: while removing directory not empty

Hi, I am getting this warning messages when I run dpkg --purge dpkg -r apt-get remove --purge aptitude purge with sudo permission to remove completely a custom application that is installed through debian dpkg command. Some of the directories in that package install path is still left out... (0 Replies)
Discussion started by: royalibrahim
0 Replies

7. Ubuntu

Problem creating Desktop shortcuts through Debian dpkg installer scripts

Hi, I am creating a debian package (*.deb) for my application using the command I am using debian pre/post installer scripts to do certain tasks before/after installation/uninstallation. One such task is to create a shortcut on the user's desktop to launch my application. I am trying to do this... (0 Replies)
Discussion started by: royalibrahim
0 Replies

8. Shell Programming and Scripting

Help with scripting APT / dpkg in Debian 4

Hello, I am attempting to write a (bash) shell script that will do some basic reporting based on the APT utilities and dpkg. I need the following in the report: Packages installed (COLUMNS=200 dpkg -l | grep '/^ii/' > packages_installed) Packages not installed I suppose that I can do ... (0 Replies)
Discussion started by: orspain
0 Replies
Login or Register to Ask a Question