Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: Search for string in files

From: Jonathan Kaye <jdkaye10(at)yahoo.es>
Date: Sun Aug 26 2007 - 01:46:01 EDT


Johannes Tax wrote:

> Hi,
>
> I'm trying to figure out how to find a certain string inside a bunch of
> files. If I, for examples, look for a certain function in a large source
> tree, I could do
>
> cat `find . -name '*.c'` | grep 'a_certain_function'
>
> but this seems quite awkward, furthermore it doesn't help that much
> because I don't know in which file the string was found. Maybe there's a
> tool that makes it possible to find a string in a bunch of files and
> also to list in which file the string was found? Or any modification to
> the command given above?
>
> Thanks a lot in advance,
>
> Johannes
>
> --
> Johannes Tax
> jo.ey@gmx.at

Hi Johannes,
If you don't mind a non-cli-solution you can use the Find File built into Konqueror. It's in the Tools menu. You just specify your filter and then go into the Contents tab where you can specify which text your looking for. You get the results in a nice clickable pane. Maybe other file managers have a similar feature.
Cheers,
Jonathan

-- 
Registerd Linux user #445917 at 
http://counter.li.org/


-- 
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Received on Sun Aug 26 01:46:26 2007

This archive was generated by hypermail 2.1.8 : Sun Oct 07 2007 - 02:57:21 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library