Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Find is unnecessary, use grep -r' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Find is unnecessary, use grep -r
Authored by: lazybone on Apr 14, '05 07:47:46PM

Two reasons why I like the original command better:

1.) Not really valid here since we're talking about OS X here: "grep -r" is not guaranteed to be available on other flavors of unix. So I don't like to rely on it's availability

2.) This one is a major one for me: When filenames contain characters that do funky stuff (international) or need to be escaped (like blanks), xargs will miserably fail, while the original command will still work.



[ Reply to This | # ]
Find is unnecessary, use grep -r
Authored by: kps on Apr 15, '05 07:32:11PM
Tip: instead of find -print | xargs, use find -print0 | xargs -0; then blanks and special characters are not a problem.

[ Reply to This | # ]