Quote: Original post by OxydQuote: Original post by Sander
How about `ls -1` then? :-)
Definitely much more useful. [smile]Quote: Original post by ToohrVyk
I commonly use grep foobar `find . -name '*.php'` as a find-in-files operation.
Does that have any advantage over find . -name '*.php' -exec grep foobar {} ';'?
Absolutely: the first will barf when the command-line length limit is reached but will prepend the filename for each match line. The second is slow because it forks for every single file encountered and will not prepend the filename for every match line.
The correct answer is find . -name '*.php' | xargs grep foobar