Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


  Search this Thread
Old 03-05-2003, 12:22 PM   #1
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.

Old 03-05-2003, 01:01 PM   #2
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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.



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

All times are GMT -5. The time now is 08:13 PM.

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