Linux-Hams archive - January 1998: Re: GREP
Re: GREP
Thu, 8 Jan 1998 08:52:35 +1100 (EST)
J. Neil Doane wrote:
> 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>
You're running two processes, find / will give you a huge list (every file
directory etc on the hard drive) then you grep it down to a few lines.
If you want to find a file and don't care what type it is find / -name 'blah'
is a better idea.
> ...for both? If you do this searching alot, try 'locate' (you may have
This is another idea, locate is good depending on how "dynamic" the filenames
are.
- Craig