Stupid linux grep question
Results 1 to 7 of 7

Thread: Stupid linux grep question

  1. #1
    Member TheX1le's Avatar
    Join Date
    Sep 2006
    Posts
    73

    Stupid linux grep question

    I installed linux on my pda and i need to know how to get grep to search the entire root system for a phrase okuwlan. I know how to pipe commands and what not just not how to get it to search EVERY thing. Thanks
    ...."Cant stop the signal Mel, Every thing goes some where and i go every where."...... "From here to the eyes and the ears of the verse, thats my motto or might be if i start having a motto" - Mr. Universe "Serenity"

  2. #2
    Member
    Join Date
    Aug 2003
    Posts
    44
    I believe
    grep -r "pattern" /
    should do the trick

  3. #3
    Member TheX1le's Avatar
    Join Date
    Sep 2006
    Posts
    73
    thats the problem i dont have r and an option this is what i get.. this is using busybox v1.0

    Usage: grep [-ihHnqvs] PATTERN [FILEs...]

    Thanks
    ...."Cant stop the signal Mel, Every thing goes some where and i go every where."...... "From here to the eyes and the ears of the verse, thats my motto or might be if i start having a motto" - Mr. Universe "Serenity"

  4. #4
    Just Another Geek
    Join Date
    Jul 2002
    Location
    Rotterdam, Netherlands
    Posts
    3,401
    Does find work?

    find / -type f -exec grep "patern" {} \;
    Oliver's Law:
    Experience is something you don't get until just after you need it.

  5. #5
    Jaded Network Admin nebulus200's Avatar
    Join Date
    Jun 2002
    Posts
    1,356
    Also keep in mind there are usually more than 1 grep on systems...

    Do a 'man -k grep' and boggle

    On mine, it came up with:
    man -k grep
    bzegrep [bzgrep] (1) - search possibly bzip2 compressed files for a regular expression
    bzfgrep [bzgrep] (1) - search possibly bzip2 compressed files for a regular expression
    bzgrep (1) - search possibly bzip2 compressed files for a regular expression
    egrep [grep] (1) - print lines matching a pattern
    fgrep [grep] (1) - print lines matching a pattern
    grep (1) - print lines matching a pattern
    grep (1p) - search a file for a pattern
    grep (rpm) - The GNU versions of grep pattern matching utilities.
    grepdiff (1) - show files modified by a diff containing a regex
    grepjar (1) - search files in a jar file for a pattern
    msggrep (1) - pattern matching on message catalog
    pcregrep (1) - a grep with Perl-compatible regular expressions
    pgrep (1) - look up or signal processes based on name and other attributes
    pkill [pgrep] (1) - look up or signal processes based on name and other attributes
    zgrep (1) - search possibly compressed files for a regular expression
    zipgrep (1) - search files in a ZIP archive for lines matching a pattern
    There is only one constant, one universal, it is the only real truth: causality. Action. Reaction. Cause and effect...There is no escape from it, we are forever slaves to it. Our only hope, our only peace is to understand it, to understand the 'why'. 'Why' is what separates us from them, you from me. 'Why' is the only real social power, without it you are powerless.

    (Merovingian - Matrix Reloaded)

  6. #6
    Member TheX1le's Avatar
    Join Date
    Sep 2006
    Posts
    73
    I do have the find command however its just Usage: find [PATH...] [EXPRESSION] so Sir dices idea doesnt apear to work. This is all running on a ipaq pda pretty cool but sucks cuz its so stripped down.
    ...."Cant stop the signal Mel, Every thing goes some where and i go every where."...... "From here to the eyes and the ears of the verse, thats my motto or might be if i start having a motto" - Mr. Universe "Serenity"

  7. #7
    Antionline Herpetologist
    Join Date
    Aug 2001
    Posts
    1,165
    Well, why don't you get the original sources and compile them? grep alone shouldn't take up too much extra space on the PDA and if you can afford a meg or two, I don't think it should be too hard. http://www.gnu.org/software/grep/

    Cheers,
    cgkanchi

    EDIT: I just checked, the compressed grep sources are ~600kb, so the binary should be less than a meg.
    Last edited by cgkanchi; November 29th, 2006 at 02:35 PM.
    Buy the Snakes of India book, support research and education (sorry the website has been discontinued)
    My blog: http://biology000.blogspot.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •