Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 03-30-2005, 08:57 PM   #1
Registered: Mar 2005
Posts: 146

Rep: Reputation: 15
Which command to search text/phrase in file?

Example: i want to find the phrase "wonderful day", i'm sure that it is contained in another files (i don't know what it is).
Which command can i find the phrase in more and more files (linux system).

Plesea tell me, thanks so much.
Old 03-30-2005, 09:11 PM   #2
Senior Member
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
grep, specifically with the -R (recursive) option if you're not sure exactly where and -i (insensitive) if you're not sure of the case. And, with a phrase, quote it. 'man grep' for details.
Old 03-30-2005, 09:11 PM   #3
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,905

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Script to search and replace in text file - kinda... jeffreybluml Programming 45 11-07-2004 05:37 PM
Search and replace text in file using shell script? matthurne Linux - Software 2 11-02-2004 10:11 AM
Search all man pages for a phrase suguru Linux - Software 1 09-12-2004 06:38 AM
Need to search for *last* occurrance in a text file ericcarlson Linux - Software 1 09-11-2004 02:08 PM
How do you search for a file in text mode? cyberkid12 Linux - General 7 12-21-2002 12:42 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:16 AM.

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