find in conjuction with grep
Kevin Wang
rightsock at gmail.com
Fri Aug 13 15:35:07 UTC 2004
On Fri, 13 Aug 2004 14:49:15 +1000, Cameron Simpson <cs at zip.com.au> wrote:
> Please don't top post. It's very annoying.
>
> On 14:51 12 Aug 2004, Kevin Wang <rightsock at gmail.com> wrote:
> | two issues - security and performance. performance was covered
> | already. explicitly, xargs can be 100x or more faster.
> |
> | The security issue I don't remember being explicitly covered.
>
> What security issue?
>
> | find . -exec grep "string" {}
> | what happens when you have a filename with a space in it?
> | quotes?
> | double quotes?
>
> Nothing. No quoting is needed _at_all_! because the shell is not involved in
> passing the filename to grep.
for gnu find, that does appear to be true. It's unfortunately not
true of all versions of find. this behaviour is new to me.
> A larger issue is that you're doing things as root without knowing how
> they work.
Which describes most people in this world. I for one, have no clue
what cups does under the covers with all the postscript rendering,
etc. I just knows that it listens on the lpd port and forwards things
to my jetdirect printer. It's impossible to be an expert on
everything, and I intended this (mostly xargs for performance) as an
instructional lesson for those who know less. OK, so I'm not perfect.
I've learned something new, and off I go.
- Kevin
More information about the fedora-list
mailing list