[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: grep problem
From: |
Alain Magloire |
Subject: |
Re: grep problem |
Date: |
Tue, 17 Sep 2002 13:29:02 -0400 (EDT) |
>
> Stepan Kasal <address@hidden> [2002-09-17 14:16:39 +0200]:
> > On Fri, Sep 13, 2002 at 09:16:48PM +1000, Dave Davey wrote:
> > > ... problem really is that it will stray into /dev if asked ...
> >
> > I don't think grep should really care about this.
> > I'd say that some combination of find & grep could solve the problem.
>
> I agree. I assume you were 'root' at the time that you hung your
> system? A non-root user should _not_ be able to hang the system. (But
> that would be determined by the file permissions on the devices in
> /dev/* which would prevent that.) But gosh it is hard to protect the
> system from the superuser. And you really don't want to do so. The
> superuser does have the ability to do bad things and to crash the
> system. It needs that in order to be able to do good things to the
> system.
>
> If anything the fix would be to remove the -r option from grep. That
> is the option that caused this trouble. Until just this moment I did
> not even know GNU grep had a recurse option. It does not need it and
> was never traditionally provided with commands. Using 'find' is a
> better option and works the same way with all of the commands.
>
I'm not the grep maintainer, but '--recursive' was the top request
for enhancement and been in grep since 1998:
1998-08-18 Paul Eggert
Add support for new -r or --recursive (or -d recurse or
--directories=recurse) option.
grep-2.5.x has :
-D, --devices=ACTION how to handle devices, FIFOs and sockets
ACTION is 'read' or 'skip'
Unfortunately I do not know where the latest version is kept.