birmingham@ic.fbi.gov , phoenix@ic.fbi.gov , fbise@leo.gov
NickSoft Linux Cookbook Index NickSoft Linux Cookbook
Quick howto's, Real live examples.
 
 FAQFAQ   SearchSearch   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[RedHat,Mandrake] Faster rpmfind command

 
Post new topic   Reply to topic    NickSoft Linux Cookbook Index -> Bash Scripts
View previous topic :: View next topic  

Vote for this article
1 - useless
0%
 0%  [ 0 ]
2 - bad
0%
 0%  [ 0 ]
3 - not so bad
0%
 0%  [ 0 ]
4 - good
0%
 0%  [ 0 ]
5 - Excelent
0%
 0%  [ 0 ]
Total Votes : 0

Author Message
NickSoft
Site Admin


Joined: 13 Nov 2006
Posts: 22

PostPosted: Mon Nov 13, 2006 2:45 pm    Post subject: [RedHat,Mandrake] Faster rpmfind command Reply with quote

How do you check for a specific rpm if it is installed? You can do it this way:
rpm -q <package name>
This way you need to enter full name
So you can do this:
rpm -qa|grep -i <part of package name>
But it's slow

Then why don't you make scripts to save rpm list. This will speed up the query:

1. Script for saving rpm list for faster reference (name it rpmlist):
Code:
#!/bin/bash
rpm -qa >~/rpmlist

2. Script for searching in rpmlist(name it rpmfind):
Code:
#!/bin/bash
grep -i $1 ~/rpmlist
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    NickSoft Linux Cookbook Index -> Bash Scripts All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




MLDb.org Magic Eight Ball Croler Web Search Croler Web Directory Bianca Ryan MyBestMatch.net Microlab.info Digger Services Sofia

Powered by 220V

AbuseIPDB Contributor Badge