Review your favorite Linux distribution.
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 02-13-2008, 01:00 PM   #1
Registered: Sep 2005
Location: New Jersey, (Which Exit LOL), USA
Distribution: Centos 6.7 Under VMware in Win7
Posts: 473

Rep: Reputation: 34
fgrep or find command question.

Hello all,

I want to find a string of characters any where in the system but I don't want the command(s) to bother looking a binary files. The string I'm looking for is more then likely in a plain text file.

What would the basic command look like, I tried this and it's taking forever:

fgreg -r string * (I'm searching from the root down) I don't know how I would set up a find command because I'm not looking for a file, just a the string of characters.

Any help will be apperciated.

Old 02-13-2008, 02:07 PM   #2
Registered: Feb 2008
Location: Montreal, Canada
Distribution: RedHat 3/4, Ubuntu 7.10
Posts: 86

Rep: Reputation: 15
Wink find

You can also do this:

find / | xargs grep 'string'

But keep in mind that you are looking for a string system-wide, thus there are no time-friendly commands to help you go through this process...


Last edited by mtimbro; 02-13-2008 at 02:09 PM.
Old 02-13-2008, 02:26 PM   #3
Registered: Sep 2005
Location: New Jersey, (Which Exit LOL), USA
Distribution: Centos 6.7 Under VMware in Win7
Posts: 473

Original Poster
Rep: Reputation: 34
Thanks for your reply.

I really don't know if my commands worked, maybe I didn't give it time enough to go throught the entire system, I'm going to try your solution.

BTW, one of the folks here in the office did find this command combinition and I'm going to also try that.

find / -type f -exec grep -l STRING {} \;

This also seems similar to my first command.

Thanks again.


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
Find/grep command to find matching files, print filename, then print matching content stefanlasiewski Programming 9 06-30-2016 06:30 PM
Find command RajRed Linux - Newbie 2 02-12-2006 12:08 AM
question on "find" command jcosenzo Linux - General 1 04-18-2005 03:39 PM
Question on find command rytrom Linux - Newbie 3 08-07-2003 03:14 AM
Find Command - Basic Question tlb04 Linux - General 3 05-06-2003 09:45 PM > Forums > Linux Forums > Linux - Newbie

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