2

I noticed in the man pages for find, that the {} always have single quotes around them.

find -exec '{}' \;

The description states:

Notice that the braces are enclosed in single quote marks to protect them from interpretation as shell script punctuation. The semicolon is simi- larly protected by the use of a backslash

I have never had an issue using just find -exec {} \;
What is an example where the single quotes are required.

2
  • My persoal find usage is very rudimentary, but I habitually backslash the curly brackets: find . -exec whatever \{\} \; – Bruce Ediger Jul 25 '13 at 0:51
  • See Gilles answer on the duplicate question, he covers it there. – slm Jul 25 '13 at 0:53

Browse other questions tagged or ask your own question.