LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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-29-2010, 01:19 PM   #1
c2431993
LQ Newbie
 
Registered: Sep 2010
Posts: 2

Rep: Reputation: 0
finding a word by using grep in whole file system


there is a specific file in which there is a word "Dictotia".I don't know where the file is present and i want to find the file in which the word is present.It is something like homework by my teacher.
 
Old 09-29-2010, 01:32 PM   #2
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
Hi there

Something like homework, or it is homework? Well, it's commendable that you did mention that, but did your teacher happen to give you any idea where to look for how to do this? Have you looked at the man page for grep? Looks like you're posting from Windows, so.. What Linux does this refer to (that you're working on), or are you doing this on Windows or Cygwin? It may make a difference at some point, but from your terminal, type:
Code:
man grep
and examine the -R option and -l option (that's a lowercase L). Grep syntax (there's a hint in there) is typically:

grep <options> <regex or word> file/path/*


Note that if the filesystem is very large, you may run into problems with resources or memory. If you need further help, show us what command(s) you're trying, and what's not working about it.

Last edited by GrapefruiTgirl; 09-29-2010 at 01:33 PM.
 
Old 09-29-2010, 06:38 PM   #3
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,005

Rep: Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191
In addition to the above information, if you are searching the entire system you may also run into permission issues.
 
  


Reply



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 a word from some files??? shahz Red Hat 3 09-06-2008 03:48 AM
finding the type of file system kakil Linux - Software 1 01-22-2008 10:58 AM
grep a word in a .tar.gz file prernabhagat Linux - General 1 12-07-2007 01:53 AM
Word count with grep DiagonalArg Linux - Software 3 02-13-2006 12:46 PM
grep throughout the whole file system....? vous Linux - Software 4 03-20-2005 01:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:09 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
Open Source Consulting | Domain Registration