LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-22-2002, 10:36 AM   #1
bkmesenbrink
Member
 
Registered: Jul 2002
Posts: 38

Rep: Reputation: 15
Question GREP Help Please


I am trying to find to search and find all files on my hard drive that contain a string that matches a certain expression. From my understanding GREP is the tool to use. However, I need help with the correct syntax. Please help!!!!
 
Old 10-22-2002, 12:14 PM   #2
leed_25
Member
 
Registered: Jul 2002
Location: san francisco
Distribution: freebsd
Posts: 102

Rep: Reputation: 17
Well, you'll have to be a little more specific, I think. Here's a command string which will grep all of the regular files for the string 'geeks rule'
Code:
find / -type f -print | xargs grep 'geeks rule'
 
Old 10-24-2002, 12:34 PM   #3
bkmesenbrink
Member
 
Registered: Jul 2002
Posts: 38

Original Poster
Rep: Reputation: 15
Thanks!!! That was just what I was looking for. Is there any way to tell find not to look in log files???
 
Old 10-24-2002, 01:50 PM   #4
moses
Senior Member
 
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152

Rep: Reputation: 48
man find
man grep
 
  


Reply


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
grep ?? can grep us variables? DaFrEQ Linux - Software 4 09-14-2005 01:22 PM
help on grep!!!! sanjith11 Programming 5 01-20-2005 06:43 PM
What does rpm -qa |grep th* (as compared to rpm -qa |grep th) display? davidas Linux - Newbie 2 03-18-2004 02:35 AM
"Undeleting" data using grep, but get "grep: memory exhausted" error SammyK Linux - Software 2 03-13-2004 04:11 PM
ps -ef|grep -v root|grep apache<<result maelstrombob Linux - Newbie 1 09-24-2003 12:38 PM


All times are GMT -5. The time now is 10:53 PM.

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