help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: using grep in dired mode: best method for ascii files


From: oliver
Subject: Re: using grep in dired mode: best method for ascii files
Date: Mon, 16 Aug 2004 16:14:12 +1000

"Patrick Drechsler" <patrick.drechsler@gmx.net> wrote in message 
m3u0v8dq74.fsf@pdrechsler.fqdn.th-h.de">news:m3u0v8dq74.fsf@pdrechsler.fqdn.th-h.de...
> Hi,
>
> can somebody give my a pointer in the manual on searching a
> folder (including subfolders) for a regexp? The subfolder include
> many binary files. I don't want to search the later.
>
> I've tried `grep-find', 'A' and `find-grep-dired`. Also marking
> the folders of interest in dired-mode. Often enough I end up
> with a grep error `123'.
>
> What I'm looking for is a command to find a regexp within my
> files containing (ascii-)code.
>
> Thankful for pointers,
>
> Patrick
> -- 
> Snoopy (on being house-trained with a rolled-up newspaper):
> It does tend however to give one a rather distorted view of the press!

you could use find-dired to execute something like:

find . \( -name <file-patten> -exec grep -q <in-file-search-pattern> {} \; 
\) -exec ls -lGd {} \;

find-grep-dired unfortunaly goes through all readable files it finds on its 
way. of course you could make your own extended "find-in-files-grep-dired", 
were you asked the user for a third string representing the file-pattern and 
put something like above together.

cheers, oliver 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]