Re: SUSE 10.1 - any issues with grep recursion?



In article <AV_og.8$MV.1166@xxxxxxxxxxxxxx>,
bobmct <r.mariottiX@xxxxxxxxx> wrote:

The *.conf was the file(s) to look in for the SSLEngine string.

To verify what I am experiencing I've tried recursing with ls. Here are
some examples from my home machine running 10.1:

/etc/apache2> ls -1 -R *.conf
[only top-level .conf files listed]

Even though I explicitly stated -R (Recurse) on the command line you can
notice that there was no recursion.

Because you didn't specify anything for it to recurse _into_. All the
items specified on the command line were files, not directories.

Now, here the results of the find command:

/etc/apache2> find . -name "*.conf" -print
[lots of .conf files, including those in subdirectories, listed]

Now, have you noticed yet the extra item you specified on the second
command line, that you did not in the first? It was ".", the name of the
directory to recurse into.

Since you only wanted the grep to look at .conf files, and not
directories or any other files, you should have used it with find in the
first place:

find . -name '*.conf' -exec grep SSLEngine '{}' ';'
.



Relevant Pages