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 09-03-2005, 07:28 PM   #1
balteo
LQ Newbie
 
Registered: Jul 2002
Posts: 27

Rep: Reputation: 15
basic question about searching files


Hello,

I want to find all files containing "foo" within the body of the file. The files can be either located in the current directory or in a sub-directory.

What is the command for that please??

Thanks in advance,

Julien.
 
Old 09-03-2005, 07:38 PM   #2
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
Hi.

What you're looking for is 'grep'.

'grep -R foo .' will search the current directory and all its subdirectories.

Dave
 
  


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
searching for files deept Programming 1 08-15-2005 11:54 AM
help searching files jorasmi Slackware 3 02-02-2005 04:06 AM
Searching files for strings tmoorman Linux - Software 4 01-08-2004 01:46 PM
editing config files.. embarassingly basic question adhara Linux - Newbie 3 12-23-2003 07:27 AM
Searching for files in KDE 3.1? bolinux Linux - Newbie 1 10-10-2003 11:40 PM


All times are GMT -5. The time now is 10:22 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