RE: find

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



tony.chamberlain@xxxxxxxxx wrote:
> I am looking for something similar to the windows SEARCH FILES comman
> with the option "files containing ..." (that is where I can specify a
> string and it will find all files containing that string -- not just
> having the string as part of the name but actually containing it in
> the text). 
> 
> Is there some way to do this?

I tend to use a combination of 'find' and 'grep'.  It looks something
like this:

  find . -type f -name '*.txt' | xargs grep 'whatever'

Add the '-l' option to grep if you just want a list of the filenames.

-- 
Bowie
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux