l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
January 6: Social gathering
Next Installfest:
TBD
Latest News:
Nov. 18: Club officer elections
Page last updated:
2002 Mar 10 12:24

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] trouble running recursive grep
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] trouble running recursive grep



On Sun, 10 Mar 2002, eric nelson wrote:
> Why doesn't this work:
> 
> (as root)
> cd /usr/src/linux/include
> grep -r pci_dev *.h
> 
> 
> I get the error
> grep: *.h No such file or directory

Look in that directory, and you will likely see no .h files in that
diretory. This is where the error is reported. No match to *.h in that
dir and no dir to search recursively has a .h extention. :-)

Instead try:
# grep pci_dev */*/*.h
or
# grep pci_dev */*.h
And see if you get no error.

Then try 
# grep pci_dev *.h
and you should see the error again

An alternate?
find . -name \*.h -print0 | xargs -0 grep "pci_dev"

> In general, what is the best way to search system include files for specific 
> strings?

"best" is a subjective term. I bet everyone here has their own best, and
some probably have other ways to do the above.

-ME

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS/CM$/IT$/LS$/S/O$ !d--(++) !s !a+++(-----) C++$(++++) U++++$(+$) P+$>+++ 
L+++$(++) E W+++$(+) N+ o K w+$>++>+++ O-@ M+$ V-$>- !PS !PE Y+ !PGP
t@-(++) 5+@ X@ R- tv- b++ DI+++ D+ G--@ e+>++>++++ h(++)>+ r*>? z?
------END GEEK CODE BLOCK------
decode: http://www.ebb.org/ungeek/ about: http://www.geekcode.com/geek.html

_______________________________________________
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech



LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
EDGE Tech Corp.
For donating some give-aways for our meetings.