[SuSE Linux] grep recursive
![](https://seccdn.libravatar.org/avatar/858201ba889a06553aee0f65338d6262.jpg?s=120&d=mm&r=g)
Hi, I hope somebody can help me. I have to search all the files in a directory and its subdirectories and their subdirectories for a string. I can search a directory at a time with fgrep 'string' *.*, but this is taking ages to do for every dirictory. Is their a way to grep recursively through the directories? I could not find anything like that in the manual. Thanks Nico - To get out of this list, please send email to majordomo@suse.com with this text in its body: unsubscribe suse-linux-e Check out the SuSE-FAQ at <A HREF="http://www.suse.com/Support/Doku/FAQ/"><A HREF="http://www.suse.com/Support/Doku/FAQ/</A">http://www.suse.com/Support/Doku/FAQ/ and the archiv at <A HREF="http://www.suse.com/Mailinglists/suse-linux-e/index.html"><A HREF="http://www.suse.com/Mailinglists/suse-linux-e/index.html</A">http://www.suse.com/Mailinglists/suse-linux-e/index.html
![](https://seccdn.libravatar.org/avatar/7801c07099ccb03548405a16630b6965.jpg?s=120&d=mm&r=g)
On 22-Jan-99 info@edoc.co.za wrote:
Hi,
I hope somebody can help me.
I have to search all the files in a directory and its subdirectories and their subdirectories for a string.
I can search a directory at a time with fgrep 'string' *.*, but this is taking ages to do for every dirictory.
Is their a way to grep recursively through the directories? I could not find anything like that in the manual.
I thought your problems is easy solved with 5 raw of perl code. You probably have perl installed. ---------------------------------- Date: 22-Jan-99 Time: 11:08:18 Mollison's Bureaucracy Hypothesis: If an idea can survive a bureaucratic review and be implemented it wasn't worth doing. ---------------------------------- - To get out of this list, please send email to majordomo@suse.com with this text in its body: unsubscribe suse-linux-e Check out the SuSE-FAQ at <A HREF="http://www.suse.com/Support/Doku/FAQ/"><A HREF="http://www.suse.com/Support/Doku/FAQ/</A">http://www.suse.com/Support/Doku/FAQ/ and the archiv at <A HREF="http://www.suse.com/Mailinglists/suse-linux-e/index.html"><A HREF="http://www.suse.com/Mailinglists/suse-linux-e/index.html</A">http://www.suse.com/Mailinglists/suse-linux-e/index.html
![](https://seccdn.libravatar.org/avatar/88cdc243004a2c7ba75df437faa44bff.jpg?s=120&d=mm&r=g)
I use rgrep, it's reasonably fast. Found it on rufus.w3.org, though I could only find RPMs from Red Hat. It takes no modifications to install the rgrep-0.98.7-1 and slang-1.2.2-3 RPMs under SuSE. You might want to take a look at Glimpse as well. It's useful for a much smaller subset of text searching problems, but it's much, much faster. - Scott info@edoc.co.za wrote:
Hi,
I hope somebody can help me.
I have to search all the files in a directory and its subdirectories and their subdirectories for a string.
I can search a directory at a time with fgrep 'string' *.*, but this is taking ages to do for every dirictory.
Is their a way to grep recursively through the directories? I could not find anything like that in the manual.
Thanks
Nico - To get out of this list, please send email to majordomo@suse.com with this text in its body: unsubscribe suse-linux-e Check out the SuSE-FAQ at <A HREF="http://www.suse.com/Support/Doku/FAQ/"><A HREF="http://www.suse.com/Support/Doku/FAQ/</A">http://www.suse.com/Support/Doku/FAQ/ and the archiv at <A HREF="http://www.suse.com/Mailinglists/suse-linux-e/index.html"><A HREF="http://www.suse.com/Mailinglists/suse-linux-e/index.html</A">http://www.suse.com/Mailinglists/suse-linux-e/index.html
- To get out of this list, please send email to majordomo@suse.com with this text in its body: unsubscribe suse-linux-e Check out the SuSE-FAQ at <A HREF="http://www.suse.com/Support/Doku/FAQ/"><A HREF="http://www.suse.com/Support/Doku/FAQ/</A">http://www.suse.com/Support/Doku/FAQ/ and the archiv at <A HREF="http://www.suse.com/Mailinglists/suse-linux-e/index.html"><A HREF="http://www.suse.com/Mailinglists/suse-linux-e/index.html</A">http://www.suse.com/Mailinglists/suse-linux-e/index.html
![](https://seccdn.libravatar.org/avatar/d15d23991566ba96f97d4b4a5a9f7895.jpg?s=120&d=mm&r=g)
Checkout the glimpse package it comes with S.u.S.E. It's an interesting program and has a feature called agrep. It basically builds an index using glimpseindex and can search entire filesystems for words etc. -M On Fri, 22 Jan 1999 info@edoc.co.za wrote:
Hi,
I hope somebody can help me.
I have to search all the files in a directory and its subdirectories and their subdirectories for a string.
I can search a directory at a time with fgrep 'string' *.*, but this is taking ages to do for every dirictory.
Is their a way to grep recursively through the directories? I could not find anything like that in the manual.
Thanks
Nico - To get out of this list, please send email to majordomo@suse.com with this text in its body: unsubscribe suse-linux-e Check out the SuSE-FAQ at <A HREF="http://www.suse.com/Support/Doku/FAQ/"><A HREF="http://www.suse.com/Support/Doku/FAQ/</A">http://www.suse.com/Support/Doku/FAQ/ and the archiv at <A HREF="http://www.suse.com/Mailinglists/suse-linux-e/index.html"><A HREF="http://www.suse.com/Mailinglists/suse-linux-e/index.html</A">http://www.suse.com/Mailinglists/suse-linux-e/index.html
- To get out of this list, please send email to majordomo@suse.com with this text in its body: unsubscribe suse-linux-e Check out the SuSE-FAQ at <A HREF="http://www.suse.com/Support/Doku/FAQ/"><A HREF="http://www.suse.com/Support/Doku/FAQ/</A">http://www.suse.com/Support/Doku/FAQ/ and the archiv at <A HREF="http://www.suse.com/Mailinglists/suse-linux-e/index.html"><A HREF="http://www.suse.com/Mailinglists/suse-linux-e/index.html</A">http://www.suse.com/Mailinglists/suse-linux-e/index.html
![](https://seccdn.libravatar.org/avatar/7dd277ee58cecd23c4c3a22e7e5f2b94.jpg?s=120&d=mm&r=g)
+----- On Fri, 22 Jan 1999 09:57:30 +0200, writes: | | Hi, | | I hope somebody can help me. | | I have to search all the files in a directory and its subdirectories | and their subdirectories for a string. | | I can search a directory at a time with fgrep 'string' *.*, but this is | taking ages to do for every dirictory. | | Is their a way to grep recursively through the directories? I could | not find anything like that in the manual. It is a tradition in Unix to not build too much functionality into one program but instead have them work together: find . -type f -exec fgrep 'string' {} \; or even better, especially if you have a lot of files: find . -type f -print | xargs -e fgrep 'string' /Michael - To get out of this list, please send email to majordomo@suse.com with this text in its body: unsubscribe suse-linux-e Check out the SuSE-FAQ at <A HREF="http://www.suse.com/Support/Doku/FAQ/"><A HREF="http://www.suse.com/Support/Doku/FAQ/</A">http://www.suse.com/Support/Doku/FAQ/ and the archiv at <A HREF="http://www.suse.com/Mailinglists/suse-linux-e/index.html"><A HREF="http://www.suse.com/Mailinglists/suse-linux-e/index.html</A">http://www.suse.com/Mailinglists/suse-linux-e/index.html
participants (5)
-
hekate@intergate.bc.ca
-
info@edoc.co.za
-
m.lusetti@mo.nettuno.it
-
Michael.Salmon@uab.ericsson.se
-
sbronson@opentv.com