On Tue, Feb 16, 2021 at 7:29 PM Kyle Evans <[email protected]> wrote:
>
> On Tue, Feb 16, 2021 at 7:23 PM Mark Millard via freebsd-current
> <[email protected]> wrote:
> >
> > I historically on occasion have done something like:
> >
> > # grep -rI ... /
> >
> > in order to find all instances of a text, including
> > in build trees and such. I now find that I need to
> > do something more like (using a more specific
> > example):
> >
> > # grep -rI --exclude-dir /dev '#define.*__FreeBSD_version'
> >
> > otherwise the grep ends up reading from the tty and waits
> > for it. Top shows, for example,
> >
> > 13470 root         22    0  12848Ki    2692Ki ttyin   11   0:00   0.00% 
> > grep -rI #define.*__FreeBSD_version /
> >
> > Is this expected? Should I have always been using
> > "--exclude-dir /dev"? What lead to the behavior
> > change?
> >
>
> I can't seem to find any evidence that gnugrep in base handled this
> any differently. Experimentation seems to reveal that modern gnugrep
> will skip devices unless they're explicitly named for searching
> (unless supplied a different --devices option), which does feel like a
> good idea.

Here's my proposal: https://people.freebsd.org/~kevans/grep-rdev.diff
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[email protected]"

Reply via email to