LinuxQuestions.org
Visit the LQ Articles and Editorials section
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-15-2003, 08:38 PM   #1
magnum818
LQ Newbie
 
Registered: Sep 2003
Location: Northridge-California-USA
Distribution: Redhat
Posts: 10

Rep: Reputation: 0
Find string pattern in directory of text files


I'm looking for the command that searched every file in a particular directory for the string "http://pdx.freedesktop.org/~fontconfig/release/". I just want file names and path returned it doesn't have to return the line number or anything, but its ok if it does return extra info.
 
Old 10-15-2003, 08:42 PM   #2
bobtmasse
LQ Newbie
 
Registered: May 2003
Location: In front of the monitor
Posts: 16

Rep: Reputation: 0
The command you are looking for is GREP. Try "man grep" at the command prompt or you can look up the command online at:

http://techpubs.sgi.com/tpl.cgi/linux/man/
 
Old 10-15-2003, 09:19 PM   #3
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix, 98,2000 + various
Posts: 3,171

Rep: Reputation: 52
generally
grep "text to match" *.txt
change the *.txt to whatever you want, or just *
you can have it just list the path and filename or whatever you
wish with other options.
 
  


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
How to replace string pattern with multi-line text in bash script? brumela Linux - Newbie 6 04-21-2011 07:56 AM
Python: find defined text string in a file, and replace the whole line Dark Carnival Programming 6 05-22-2007 07:02 AM
How to recursively rename files using their directory name pattern ceg4048 Linux - General 2 09-28-2005 02:16 PM
renaming text files based upon a pattern in their content Spacepup Linux - General 1 07-28-2005 02:43 PM
How to find a string in a directory? iclinux Linux - Newbie 2 07-02-2005 09:20 AM


All times are GMT -5. The time now is 12:24 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration