Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm curious as to what the {} in the following command is actually for?

Example Command:

find /foo/ -name "*.txt" -exec rm -v {} \;

The Man page provided a small blurb but it confused me a little bit:

The string '{}' is replaced by the current file name being processed everywhere it occurs in the arguments to the command, not just in arguments where it is alone, as in some versions of find.

share|improve this question
up vote 11 down vote accepted

That's the symbol that gets replaced by the file name that find comes up with.

share|improve this answer
Ah that makes sense and could i add another argument after that? – chrisjlee Feb 1 '12 at 16:27
You can add whatever you like: it is just an argument. pretty much like "$a-single-output-file-name" when -exec ends with \; ... but it means "$multiple" "$output" "$filenames" when -exec ends with \+ – Peter.O Feb 1 '12 at 16:35
Good comment by Peter.O :). See also related answer to Question on find -exec – Tatjana Heuser Feb 1 '12 at 18:04
Thanks @Peter.O For confirming that. – chrisjlee Feb 9 '12 at 6:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.