Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
07-22-2004, 06:04 AM
|
#1
|
Member
Registered: Jul 2004
Location: india
Distribution: RH
Posts: 189
Rep:
|
how to search files with specific contents ?
Hi Linux-GURUs ,
Actually i am looking for a command that will allow me to search for files with specific contents . I know one command for searching specific files .
i.e. Locate command .....but how to find specific contents ?? . Please help me out . I'm using RedHat 9.0 . U need more details ?? .
Thanks in advance .... !!!! Cheers !!!!!!! .
|
|
|
07-22-2004, 06:14 AM
|
#2
|
Member
Registered: May 2002
Location: Essex, UK
Distribution: Debian, Redhat, AIX 5L
Posts: 512
Rep:
|
# grep "foo bar" *
|
|
|
07-22-2004, 06:41 AM
|
#3
|
Member
Registered: Jul 2004
Location: india
Distribution: RH
Posts: 189
Original Poster
Rep:
|
thanx
thanx Frustin .... it worked ....
|
|
|
07-22-2004, 06:43 AM
|
#4
|
Member
Registered: May 2002
Location: Essex, UK
Distribution: Debian, Redhat, AIX 5L
Posts: 512
Rep:
|
of course it did
|
|
|
07-22-2004, 09:00 AM
|
#5
|
Member
Registered: Nov 2002
Location: England
Distribution: Ubuntu 9.04
Posts: 631
Rep:
|
If you had wanted to search files that weren't all the current directory, something like
find /mydir -exec grep foobar {} \;
would have worked.
|
|
|
All times are GMT -5. The time now is 08:56 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|