?
Solved

rpm -ql squid | grep ncsa

Posted on 2005-03-01
3
Medium Priority
?
896 Views
Last Modified: 2013-11-13
rpm -ql squid | grep ncsa /usr/lib/squid/ncsa_auth

what is the command above do
0
Comment
Question by:teera
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 8

Accepted Solution

by:
marxy earned 400 total points
ID: 13436966
1. rpm -ql <some_rpm>
It lists all files in the RPM package specified. This is squid in this case.
2. grep  ncsa /usr/lib/squid/ncsa_auth
Grep find matches.
There grep finds 'ncsa' in the file /usr/lib/squid/ncsa_auth.

But in '|' it has no sense at all.
grep has this syntax
    grep [options] PATTERN [FILE...]

In the example above grep has FILE parameter already.
Therefore, it searchs pattern 'ncsa' in the file  /usr/lib/squid/ncsa_auth. Not in the list of 'rpm -ql'.
0
 
LVL 7

Assisted Solution

by:surya_prabhakar
surya_prabhakar earned 400 total points
ID: 13438291
> rpm -ql squid | grep ncsa /usr/lib/squid/ncsa_auth

this is wrong . instead
do either
# rpm -ql | grep ncsa

seraches for the word ncsa from the output of ncsa

or
# grep ncsa /usr/lib/squid/ncsa_auth

searches for word ncsa from the file ncsa_auth
Are you trying to understand that whether a particular file comes from which rpm if so then
# rpm -qf /usr/lib/ncsa_auth

surya.

0
 
LVL 6

Assisted Solution

by:makhan
makhan earned 400 total points
ID: 13446592
to find if squid package contains any file named ncsa

use

rpm -ql squid | grep -i ncsa



0

Featured Post

Command Line Tips and Tricks

The command line is a powerful tool at the disposal of every Linux user. Although Linux distros come with beautiful user interfaces, it's worthwhile to learn the command line because it allows you to do a number of things that you otherwise cannot do from the GUI.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the most frequently asked questions on EE in the "Windows Installer" zone is how to eliminate self-triggered installation of some product.  The problem occurs when, suddenly, whenever a certain application is launched, or even when a folder i…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses
Course of the Month11 days, 10 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question