From: | "Simon 'corecode' Schubert" <corecode@xxxxxxxxxxxx> |
Date: | Fri, 17 Jun 2005 17:47:16 +0200 |
:find attached a patch to grep to only read real files, ignoring symlinks,
:devices, etc.(-O --only-files). I felt I need this for grepping my /src/sys
:which also contains some compile/* directories where modules produce recurs=
:ive
:loops...
Well, there is at least one issue with this. I'm not sure the option is
general enough. e.g. perhaps it should not avoid symlinks. I'd use
stat() rather then lstat() at the very least.
Grep isn't realliy the best utility to search an entire hierarchy. I would use a comnation of find with the -exec option to write a search script.
cheers simon
-- Serve - BSD +++ RENT this banner advert +++ ASCII Ribbon /"\ Work - Mac +++ space for low $$$ NOW!1 +++ Campaign \ / Party Enjoy Relax | http://dragonflybsd.org Against HTML \ Dude 2c 2 the max ! http://golden-apple.biz Mail + News / \
Attachment:
PGP.sig
Description: This is a digitally signed message part