Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 09-29-2010, 02:19 PM   #1
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, 02:32 PM   #2
LQ Guru
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
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:
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 02:33 PM.
Old 09-29-2010, 07:38 PM   #3
LQ Guru
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,550

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


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

All times are GMT -5. The time now is 02:17 PM.

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