LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-05-2005, 05:43 AM   #1
bong.mau
Member
 
Registered: Apr 2004
Posts: 391

Rep: Reputation: 30
rpm query


Hi
env:kernel 2.6
i use the "rpm -q packagename" to query if a package is installed
but this implies to use the exact packagename....
unaware of the exact packagename is use this command
rpm -qa | grep packagepattern
i obtain what i need with this command,but it is slow ...
"example
i insalled package zlib,but the rpm db know it like zlib1
so the "rpm -q zlib1" list the package as installed but "rpm -q zlib" does not list it...."
is there an rpm command to query the rpm database for a packagepattern ?
thanks in advance
Maurizio
 
Old 11-05-2005, 07:48 AM   #2
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
How about slocate zlib ?
 
Old 11-05-2005, 10:20 AM   #3
ekman
Member
 
Registered: Apr 2004
Location: Sweden
Posts: 41

Rep: Reputation: 15
Store the rpm-list at some place and use it as a cache;
> rpm -qa > /tmp/allrpms
> grep packagepattern
Subsequent greps will of course be fast.
BTW here is a command that prints sizes of installed packets in a neat way;
rpm -qa --queryformat '%-16{SIZE} %{NAME}\n' | sort -nr
Best regards,
L Ekman
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
QUERY: unusual .src.rpm files.... kevingpo Fedora 1 07-23-2005 12:31 AM
rpm query lucky123 Linux - Newbie 1 04-21-2005 01:41 PM
FC3: RPM won't do anything (query, remove) Jamo Fedora 7 02-15-2005 07:23 AM
Winex does not appear in rpm query jorisb Linux - Software 2 02-03-2004 01:29 PM
rpm query size? lf412 Linux - Newbie 3 03-04-2003 12:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration