Hi Jim, Lets say i want to search for "#include " (on my machine, i could not find any random.h under c++ directory) and this below grep command works fine for me.. dev-RH: root - redhat[/usr/include/c++/4.1.1] *# grep -r "#include " ** backward/alloc.h:#include backward/function.h:#include backward/heap.h:#include backward/pair.h:#include ..... ..... maybe, lets search random.h under all subdirectories(-r) and only one output per file(-m 1) will ok, to avoid screen full of texts. *grep -r -m 1 "random.h" * * Let us know if still you are facing any issues. Have a great day! *Best Regards,* *Sekar * *The smallest things can have the biggest impact. Look inside. - Intel* On Wed, Jun 18, 2014 at 10:32 AM, Paul Eggert wrote: > Jim Michaels wrote: > >> grep random "#include <(bits/)?random(\.h)?>" * >> expected: on the include/c++/bits dir of a gcc compiler should produce a >> couple of results. >> >> actual: produces pages and pages with just about every file in it. >> anything with the word random in it >> > > That's because your command asked to find the word 'random'. It's of the > form: > > grep random LIST-OF-FILE-NAMES > > The first file name is "#include <(bits/)?random(\.h)?>", which grep > complained to you about. > > > >