What’s the {} in find /path/ -exec command ‘{}’ do

find

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.

Best Answer

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

Related Question