• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 907
  • Last Modified:

rpm -ql squid | grep ncsa

rpm -ql squid | grep ncsa /usr/lib/squid/ncsa_auth

what is the command above do
0
teera
Asked:
teera
3 Solutions
 
marxyCommented:
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
 
surya_prabhakarCommented:
> 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
 
makhanCommented:
to find if squid package contains any file named ncsa

use

rpm -ql squid | grep -i ncsa



0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now