With this set of commands, what are the {}
and \\;
characters for?
find . -name \'*.clj\' -exec grep -r resources {} \\;
The string {}
in find
is replaced by the pathname of the current file.
The semicolon is used for terminating the shell command invoked by find
utility.
It needs to be escaped, or quoted, so it won't be interpreted by the shell, because ;
is one of the special characters used by shell (list operators).
See also: Why are the backslash and semicolon required with the find command's -exec option?