Re: printing the associated filenames found by 'strings'

subPlanck_at_excite.com
Date: 03/31/05


Date: 31 Mar 2005 05:32:59 -0800


Greg Beeker wrote:
> subPlanck@excite.com wrote:
> > I'm trying to find a certain text string in a large number of
binary
> > files. The 'strings' utility finds the files, the offset and the
> string
> > I'm searching for, but it doesn't print the associated filenames,
> like
> > grep does. How do I modify the expression below to show them?
> >
> > find / -name "*.dll" -exec string -a -x {} ; | grep 'foo bar'
> >
> > z.entropic
>
> pipe the command thru xargs
>
> find . -name "*.dll" | xargs -i -t strings -a -x {}
>
> Then you will see the filenames.

Yes, I see them, but there's a million of lines scrolling on my screen
(so many DLLs...), thus making '| pg' impractical, then somehow the
output cannot be redirected into a tmp file to be browsed at my
leisure, and the filenames are not on the same line...

Maybe somebody should rewrite 'strings' to print filenames, like grep
does?

z.entropic



Relevant Pages

  • Re: Security implications of using open() on untrusted strings.
    ... Jorgen Grahn wrote: ... regexery however I would like to check filenames and I would like this ... Although it's a desktop app I'm a little squeamish ... Compare with a language where if the string ...
    (comp.lang.python)
  • Re: Extracting patterned filenames from [glob] without a loop - possible?
    ... > obtain the correct pattern to make it work. ... A couple obvious problems relate to the fact you are using string ... This is relatively safe since lists can easily be converted ... filenames without 'horrifcally clogging' a system. ...
    (comp.lang.tcl)
  • Re: Finding files containing string
    ... >> I need to list all files that refer to my network-name, ... >> piping through grep 'string', but that doesn't search recursively, the ... >> actually give me the filenames anyway. ... > remove the -l option from grep. ...
    (Fedora)
  • Re: Security implications of using open() on untrusted strings.
    ... regexery however I would like to check filenames and I would like this ... Although it's a desktop app I'm a little squeamish ... piping raw user input into a filesystem function like that and this app ... Compare with a language where if the string ...
    (comp.lang.python)
  • Re: How can I make a copy of my collection?
    ... Public Class FileNames ... Public fullName As String ... This app is simply to help me try to conform some of the files names ... And then even sub folders for file types. ...
    (microsoft.public.dotnet.languages.vb)