From info@edoc.co.za Fri Jan 22 07:57:30 1999 From: info@edoc.co.za To: users@lists.opensuse.org Subject: [SuSE Linux] grep recursive Date: Fri, 22 Jan 1999 09:57:30 +0200 Message-ID: <199901220909.BAA05312@mail.suse.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7861305647947266485==" --===============7861305647947266485== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi, I hope somebody can help me. I have to search all the files in a directory and its subdirectories=20 and their subdirectories for a string. I can search a directory at a time with fgrep 'string' *.*, but this is=20 taking ages to do for every dirictory. Is their a way to grep recursively through the directories? I could=20 not find anything like that in the manual. Thanks Nico - To get out of this list, please send email to majordomo(a)suse.com with this text in its body: unsubscribe suse-linux-e Check out the SuSE-FAQ at <= A HREF=3D"http://www.suse.com/Support/Doku/FAQ/http://www.suse.com/Suppo= rt/Doku/FAQ/> and the archiv at htt= p://www.suse.com/Mailinglists/suse-linux-e/index.html> --===============7861305647947266485==-- From m.lusetti@mo.nettuno.it Fri Jan 22 10:09:13 1999 From: m.lusetti@mo.nettuno.it To: users@lists.opensuse.org Subject: RE: [SuSE Linux] grep recursive Date: Fri, 22 Jan 1999 11:09:13 +0100 Message-ID: In-Reply-To: <199901220909.BAA05312@mail.suse.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8098739939718118881==" --===============8098739939718118881== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On 22-Jan-99 info(a)edoc.co.za wrote: >=20 > Hi, >=20 > I hope somebody can help me. >=20 > I have to search all the files in a directory and its subdirectories=20 > and their subdirectories for a string. >=20 > I can search a directory at a time with fgrep 'string' *.*, but this is=20 > taking ages to do for every dirictory. >=20 > Is their a way to grep recursively through the directories? I could=20 > not find anything like that in the manual. >=20 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(a)suse.com with this text in its body: unsubscribe suse-linux-e Check out the SuSE-FAQ at <= A HREF=3D"http://www.suse.com/Support/Doku/FAQ/http://www.suse.com/Suppo= rt/Doku/FAQ/> and the archiv at htt= p://www.suse.com/Mailinglists/suse-linux-e/index.html> --===============8098739939718118881==-- From sbronson@opentv.com Fri Jan 22 11:29:20 1999 From: sbronson@opentv.com To: users@lists.opensuse.org Subject: Re: [SuSE Linux] grep recursive Date: Fri, 22 Jan 1999 12:29:20 +0100 Message-ID: <36A86110.A17EFDEC@opentv.com> In-Reply-To: <199901220909.BAA05312@mail.suse.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0229840866859266030==" --===============0229840866859266030== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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(a)edoc.co.za wrote: >=20 > Hi, >=20 > I hope somebody can help me. >=20 > I have to search all the files in a directory and its subdirectories > and their subdirectories for a string. >=20 > I can search a directory at a time with fgrep 'string' *.*, but this is > taking ages to do for every dirictory. >=20 > Is their a way to grep recursively through the directories? I could > not find anything like that in the manual. >=20 > Thanks >=20 > Nico > - > To get out of this list, please send email to majordomo(a)suse.com with > this text in its body: unsubscribe suse-linux-e > Check out the SuSE-FAQ at http://www.suse.com/Sup= port/Doku/FAQ/> and the > archiv at h= ttp://www.suse.com/Mailinglists/suse-linux-e/index.html> - To get out of this list, please send email to majordomo(a)suse.com with this text in its body: unsubscribe suse-linux-e Check out the SuSE-FAQ at <= A HREF=3D"http://www.suse.com/Support/Doku/FAQ/http://www.suse.com/Suppo= rt/Doku/FAQ/> and the archiv at htt= p://www.suse.com/Mailinglists/suse-linux-e/index.html> --===============0229840866859266030==-- From hekate@intergate.bc.ca Fri Jan 22 20:22:20 1999 From: hekate@intergate.bc.ca To: users@lists.opensuse.org Subject: Re: [SuSE Linux] grep recursive Date: Fri, 22 Jan 1999 12:22:20 -0800 Message-ID: In-Reply-To: <199901220909.BAA05312@mail.suse.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6769945797409716718==" --===============6769945797409716718== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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(a)edoc.co.za wrote: >=20 > Hi, >=20 > I hope somebody can help me. >=20 > I have to search all the files in a directory and its subdirectories=20 > and their subdirectories for a string. >=20 > I can search a directory at a time with fgrep 'string' *.*, but this is=20 > taking ages to do for every dirictory. >=20 > Is their a way to grep recursively through the directories? I could=20 > not find anything like that in the manual. >=20 > Thanks >=20 > Nico > - > To get out of this list, please send email to majordomo(a)suse.com with > this text in its body: unsubscribe suse-linux-e > Check out the SuSE-FAQ at http://www.suse.com/Sup= port/Doku/FAQ/> and the > archiv at h= ttp://www.suse.com/Mailinglists/suse-linux-e/index.html> >=20 - To get out of this list, please send email to majordomo(a)suse.com with this text in its body: unsubscribe suse-linux-e Check out the SuSE-FAQ at <= A HREF=3D"http://www.suse.com/Support/Doku/FAQ/http://www.suse.com/Suppo= rt/Doku/FAQ/> and the archiv at htt= p://www.suse.com/Mailinglists/suse-linux-e/index.html> --===============6769945797409716718==-- From Michael.Salmon@uab.ericsson.se Fri Jan 29 09:02:11 1999 From: Michael.Salmon@uab.ericsson.se To: users@lists.opensuse.org Subject: Re: [SuSE Linux] grep recursive Date: Fri, 29 Jan 1999 10:02:11 +0100 Message-ID: <199901290902.KAA21304@uabs78c65.uab.ericsson.se> In-Reply-To: <199901220909.BAA05312@mail.suse.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7225733593807947946==" --===============7225733593807947946== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable +----- On Fri, 22 Jan 1999 09:57:30 +0200, writes: |=20 | Hi, |=20 | I hope somebody can help me. |=20 | I have to search all the files in a directory and its subdirectories=20 | and their subdirectories for a string. |=20 | I can search a directory at a time with fgrep 'string' *.*, but this is=20 | taking ages to do for every dirictory. |=20 | Is their a way to grep recursively through the directories? I could=20 | not find anything like that in the manual. It is a tradition in Unix to not build too much functionality into one=20 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(a)suse.com with this text in its body: unsubscribe suse-linux-e Check out the SuSE-FAQ at <= A HREF=3D"http://www.suse.com/Support/Doku/FAQ/http://www.suse.com/Suppo= rt/Doku/FAQ/> and the archiv at htt= p://www.suse.com/Mailinglists/suse-linux-e/index.html> --===============7225733593807947946==--