LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 03-05-2003, 01:22 PM   #1
tarballed
Member
 
Registered: Jun 2002
Distribution: RH, FC, FreeBSD,OpenBSD
Posts: 326

Rep: Reputation: 30
Finding files question...


Morning everyone. I have a question here that I have been meaning to post, but have not had the time.

Basically, here is my question:
It revolves around find and the rpm -qa command.

Lets start with rpm -qa.

If I wanted to find a set of RPM's, for instance let's use LDAP, what would be the appropriate syntax to use.

For example:

rpm -qa |grep ldap*

Or would you use a single quote or double quotes?
Can someone explain to me why I would use a single quote or double quote when searching for rpms or files?

In the example above, I was trying to find all files that start with LDAP and whatever extension after that.

I want to know how to narrow down my search for specific items, but at the same time, yielding more specific results.

Any input is much appreciated.

Tarballed
 
Old 03-05-2003, 02:01 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,004
Blog Entries: 11

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
rpm -qa | grep -i ldap

grep doesn't know anything about * as in
a files name, it just looks at text, using regular
expressions ... so if you wanted a wild-card
you'd have to do ldap.* (search any string that
matches ldap plus any number of any other
char) ... but it still would be case sensitive.

Cheers
Tink
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Finding six month old files arockia Linux - Software 11 09-01-2004 10:37 AM
Finding files with terminal joeman3429 Fedora 10 07-22-2004 10:13 PM
finding files in C++ poeta_boy Programming 2 07-11-2004 02:25 AM
Finding files brentos Linux - General 3 03-22-2004 09:24 PM
Finding files Nicksan Linux - Software 3 06-30-2003 08:16 PM


All times are GMT -5. The time now is 04:42 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration