grep is always recursive

Smoot Carl-Mitchell smoot at tic.com
Sun Jan 25 03:51:49 UTC 2009


On Sat, 2009-01-24 at 10:42 -0500, Hal Burgiss wrote:
> Does anyone know of a setting anywhere in Ubuntu (8.04), that would
> cause grep to *always* behave as if it were run as 'grep -r'? My home
> system always greps recursively, which is highly annoying. I cannot
> find an environment setting or system file to explain this, yet
> grepping something simple in my home dir, as an example, returns a
> huge list of files, including files in various subdirectories. It
> makes no difference whatsoever whether grep is invoked as 'grep' or
> 'grep -r', the behavior is identical. I have other 8.04 systems that
> don't do this, so its quite curious to me. What I want is equivalent
> to:

You do not happen to have a directory called "-r" in your home
directory.  That would cause the problem you are seeing.
-- 
Smoot Carl-Mitchell
Computer Systems and
Network Consultant
smoot at tic.com
+1 480 922 7313
cell: +1 602 421 9005




More information about the ubuntu-users mailing list