Linux-Hams archive - January 1998: Re: GREP

Re: GREP

J. Neil Doane (terhi.victor@logonet.com)
Wed, 7 Jan 1998 12:51:11 -0600 (CST)


On Wed, 7 Jan 1998, Daniel Avila wrote:

> I want to search my whole sys for a certain file ex:httpd can someone give
> me an example for the following grep items.
> I need to know the basics like what goes in brakets if anything at all and
> so on
>
> A1. grep for a file:

Why not:
find / | grep <filename>

...for both? If you do this searching alot, try 'locate' (you may have
to run 'updatedb' beforehand, but it makes a db and saves your drives from
the gronking effects of running 'find's all the time.

neil doane

>
>
>
> A2. grep for a dir:
>
> Thanks,
> Daniel Avila
>
>