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
Printable View
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
I believe
grep -r "pattern" /
should do the trick
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
Does find work?
find / -type f -exec grep "patern" {} \;
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:
Quote:
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
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.
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.