Linux-Hams archive - January 1998: Re: GREP

Re: GREP


Thu, 8 Jan 1998 08:05:47 +1100 (EST)


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
I don't think you want grep, you want find. Do you want to answer questions
like "where is the file or directory called foo.txt"

I'll assume that is what you mean.

> A1. grep for a file:
find / -type f -name 'myfile.txt'

> A2. grep for a dir:
find / -type -d -name 'mydirectory'

- Craig