Reputation: 141210
What is the practical difference between the following two commands?
Command A
find . -type f -print0 | xargs -0 grep -r masi
Command B
find . -type f -print0 | xargs -0 grep masi
In short, what is the practical benefit of Command A?
Upvotes: 1
Views: 1977
Reputation: 2640
I think none The A will try to recurse over file names (as the find is only searching for files) so it will not recurse into anything...
Upvotes: 1
Reputation: 40224
None .. -r
is for recursively searching directories, but the -type f
will prevent find
from returning directory names.
Upvotes: 3