rpm -ql squid | grep ncsa

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

what is the command above do
Question by:teera
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

Accepted Solution

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'.

Assisted Solution

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

# 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



Assisted Solution

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


rpm -ql squid | grep -i ncsa


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